Mercurial Hosting > nabble
view src/nabble/view/web/util/codemirror/css/font.js @ 16:2e504670a010
google fonts https
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Oct 2019 22:14:53 -0600 |
parents | 7ecd1a4ef557 |
children |
line wrap: on
line source
function waitForStyles() { for (var i = 0; i < document.styleSheets.length; i++) if (/googleapis/.test(document.styleSheets[i].href)) return document.body.className += " droid"; setTimeout(waitForStyles, 100); } setTimeout(function() { if (/AppleWebKit/.test(navigator.userAgent) && /iP[oa]d|iPhone/.test(navigator.userAgent)) return; var link = document.createElement("LINK"); link.type = "text/css"; link.rel = "stylesheet"; link.href = "https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans:bold"; document.documentElement.getElementsByTagName("HEAD")[0].appendChild(link); waitForStyles(); }, 20);