Last active
May 16, 2018 04:06
-
-
Save martianyi/a994487ec5efca140b69d50d30495312 to your computer and use it in GitHub Desktop.
feature detect desktop browser
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; | |
var isChrome = !!window.chrome && !!window.chrome.webstore; | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment