Created
April 7, 2014 17:16
-
-
Save astronom/10024386 to your computer and use it in GitHub Desktop.
additional browser detection
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
// from http://ryanmorr.com/the-state-of-browser-detection/ | |
if('opera' in window && ({}).toString.call(window.opera) === '[object Opera]'){ | |
// detect Opera 14- | |
} | |
if('operamini' in window && ({}).toString.call(window.operamini) === '[object OperaMini]'){ | |
// detect Opera Mini | |
} | |
if('PalmSystem' in window){ | |
// detect webOS | |
} | |
if('blackberry' in window){ | |
// detect blackberry | |
} | |
if('MozAppearance' in document.documentElement.style){ | |
// detect Mozilla | |
} | |
if('WebkitAppearance' in document.documentElement.style){ | |
// detect WebKit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment