Created
April 24, 2019 16:04
-
-
Save kisildev/8e5724c061abe6688adbac7d1531526c to your computer and use it in GitHub Desktop.
JS Check 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 is_opera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
var is_Edge = navigator.userAgent.indexOf("Edge") > -1; | |
var is_chrome = !!window.chrome && !is_opera && !is_Edge; | |
var is_explorer= typeof document !== 'undefined' && !!document.documentMode && !is_Edge; | |
var is_firefox = typeof window.InstallTrigger !== 'undefined'; | |
var is_safari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment