Permalink
Browse files

Fix Browser Detection Script [Need to test]

  • Loading branch information...
1 parent fdea85e commit a7566d690b70b6063d7a8014559ad6fb27bf675e @kingsidharth committed Nov 5, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 js/scripts.js
View
@@ -1,6 +1,7 @@
/*
* INDEX
* 1. Sets minimum content height to full browser height.
+ * 2. Turn off webkit font soothing; except Windows
*/
@@ -10,5 +11,14 @@ $(function() {
//$("#logo").css("height", $("#logo").css('width') );
});
-//2.
-var os = navigator.platform;
+// 2. Turn off webkit font soothing; except Windows
+//Not needed on MAC OS. Looks shitty.
+var OSName ="Unknown OS";
+if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
+if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
+if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
+if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
+
+if (OSName == "Win32") {
+ $("body").css("-webkit-font-smoothing", "antialiased");
+}

0 comments on commit a7566d6

Please sign in to comment.