Created
October 11, 2016 17:27
-
-
Save bliaxiong/c8bc2297d9d7d387b8c144812ae79c1d to your computer and use it in GitHub Desktop.
This file contains 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
// Opera 8.0+ | |
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
// Firefox 1.0+ | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
// Safari <= 9 "[object HTMLElementConstructor]" | |
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; | |
// Internet Explorer 6-11 | |
var isIE = /*@cc_on!@*/false || !!document.documentMode; | |
// Edge 20+ | |
var isEdge = !isIE && !!window.StyleMedia; | |
// Chrome 1+ | |
var isChrome = !!window.chrome && !!window.chrome.webstore; | |
// Blink engine detection | |
var isBlink = (isChrome || isOpera) && !!window.CSS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment