Created
May 24, 2017 08:35
-
-
Save Borovensky/a225b232844dc68423617549620f2c8e to your computer and use it in GitHub Desktop.
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
function get_browser(){ | |
var ua = navigator.userAgent; | |
if (ua.search(/Chrome/) > 0) return 'Chrome'; | |
if (ua.search(/Firefox/) > 0) return 'Firefox'; | |
if (ua.search(/Opera/) > 0) return 'Opera'; | |
if (ua.search(/Safari/) > 0) return 'Safari'; | |
if (ua.search(/MSIE/) > 0) return 'Internet Explorer'; | |
return 'Не определен'; | |
} | |
var browser = get_browser(); | |
if(browser == 'Chrome'){ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment