Mercurial Hosting > nabble
comparison src/nabble/view/web/util/codemirror/css/font.js @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children | 2e504670a010 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
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); |