Created
December 13, 2016 09:10
-
-
Save rafaelmaeuer/6aa2b0e6c71eda74d10d85b4d6ba3f38 to your computer and use it in GitHub Desktop.
Check if Browser is Chrome or Safari
From http://stackoverflow.com/questions/12625876/how-to-detect-chrome-and-safari-browser-webkit
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 isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); | |
var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); | |
if (isChrome) alert("You are using Chrome!"); | |
if (isSafari) alert("You are using Safari!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment