Last active
September 16, 2015 23:03
-
-
Save edysegura/2e1474711e355da318af to your computer and use it in GitHub Desktop.
[JS] Browser Detection
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 result = navigator.userAgent.match(/(opera|chrome|safari|firefox|msie|trident)\/?\s*(\.?\d+(\.\d+)*)/i); | |
//output: ["Chrome/41.0.2272.76", "Chrome", "41.0.2272.76", ".76"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment