Skip to content

Instantly share code, notes, and snippets.

@astronom
Created April 7, 2014 17:16
Show Gist options
  • Save astronom/10024386 to your computer and use it in GitHub Desktop.
Save astronom/10024386 to your computer and use it in GitHub Desktop.
additional browser detection
// 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