Created
February 25, 2016 14:44
-
-
Save stasgavrylov/2c441fd8e06beda7ebc3 to your computer and use it in GitHub Desktop.
Basic mobile device detection
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 UA = navigator.userAgent | |
| var regex = /iPad|iPhone|iPod|Android/i | |
| if (regex.test(UA)) ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment