Created
September 9, 2017 19:52
-
-
Save ihorduchenko/dd16e74ac3e04c185ecba2767f26317d to your computer and use it in GitHub Desktop.
Load styles if IOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMobile = (/iPhone|iPad|iPod/i.test(navigator.userAgent)); | |
if (!isMobile) { | |
(function() { | |
var css = [ | |
'./path/to/file.css' | |
], | |
i = 0, | |
link = document.createElement('link'), | |
head = document.getElementsByTagName('head')[0], | |
tmp; | |
link.rel = 'stylesheet'; | |
for(; i < css.length; i++){ | |
tmp = link.cloneNode(true); | |
tmp.href = css[i]; | |
head.appendChild(tmp); | |
} | |
})(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment