Created
September 28, 2018 13:08
-
-
Save supahfunk/fb5b8ea912376ca1d517f3b0132d123e to your computer and use it in GitHub Desktop.
Browser detect
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_chrome = navigator.userAgent.indexOf('Chrome') > -1; | |
var is_explorer = navigator.userAgent.indexOf('MSIE') > -1; | |
var is_firefox = navigator.userAgent.indexOf('Firefox') > -1; | |
var is_safari = navigator.userAgent.indexOf("Safari") > -1; | |
var is_opera = navigator.userAgent.toLowerCase().indexOf("op") > -1; | |
if ((is_chrome)&&(is_safari)) { is_safari = false; } | |
if ((is_chrome)&&(is_opera)) { is_chrome = false; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment