Created
May 12, 2014 10:02
-
-
Save Dpblandin/9433335c47831c045c81 to your computer and use it in GitHub Desktop.
Detect user agent based on the navigator.userAgent property
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 isMobile = navigator.userAgent.match(/Android|BlackBerry|BB10|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment