0
|
1 function waitForStyles() {
|
|
2 for (var i = 0; i < document.styleSheets.length; i++)
|
|
3 if (/googleapis/.test(document.styleSheets[i].href))
|
|
4 return document.body.className += " droid";
|
|
5 setTimeout(waitForStyles, 100);
|
|
6 }
|
|
7 setTimeout(function() {
|
|
8 if (/AppleWebKit/.test(navigator.userAgent) && /iP[oa]d|iPhone/.test(navigator.userAgent)) return;
|
|
9 var link = document.createElement("LINK");
|
|
10 link.type = "text/css";
|
|
11 link.rel = "stylesheet";
|
|
12 link.href = "http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold";
|
|
13 document.documentElement.getElementsByTagName("HEAD")[0].appendChild(link);
|
|
14 waitForStyles();
|
|
15 }, 20);
|