Skip to content

Instantly share code, notes, and snippets.

@xperiments
Created June 27, 2013 21:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xperiments/5880624 to your computer and use it in GitHub Desktop.
Save xperiments/5880624 to your computer and use it in GitHub Desktop.
var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
var isFirefox = typeof InstallTrigger !== 'undefined'; // Firefox 1.0+
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
// At least Safari 3+: "[object HTMLElementConstructor]"
var isChrome = !!window.chrome && !isOpera; // Chrome 1+
var isIE = /*@cc_on!@*/false; // At least IE6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment