Last active
November 20, 2018 15:33
-
-
Save djalmajr/dfe6c59fe9296d149ec795f124ad8719 to your computer and use it in GitHub Desktop.
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 isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(" OPR/") >= 0 | |
, isIE = /*@cc_on!@*/false || !!document.documentMode | |
, isChrome = !!window.chrome && !!window.chrome.webstore; | |
window.__BrowserDetection = { | |
// Opera 8.0+ | |
isOpera: isOpera, | |
// Firefox 1.0+ | |
isFirefox: typeof InstallTrigger !== "undefined", | |
// At least Safari 3+: "[object HTMLElementConstructor]" | |
isSafari: Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor") > 0, | |
// Internet Explorer 6-11 | |
isIE: isIE, | |
// Edge 20+ | |
isEdge: !isIE && !!window.StyleMedia, | |
// Chrome 1+ | |
isChrome: isChrome, | |
// Blink engine detection | |
isBlink: (isChrome || isOpera) && !!window.CSS, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment