Created
October 19, 2017 19:43
-
-
Save AienTech/852049644955faa848b5d55a2da34d87 to your computer and use it in GitHub Desktop.
Check for browser name
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
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification)); | |
var isIE = /*@cc_on!@*/false || !!document.documentMode; | |
var isEdge = !isIE && !!window.StyleMedia; | |
var isChrome = !!window.chrome && !!window.chrome.webstore; | |
var isBlink = (isChrome || isOpera) && !!window.CSS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment