Created
October 26, 2011 00:37
-
-
Save danro/1314995 to your computer and use it in GitHub Desktop.
Mobile UA sniffing (evil)
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
| // with iPad | |
| navigator.userAgent.match(/mobile|iphone|ipod|blackberry|android|palm|windows\s+ce/i) | |
| // without iPad | |
| navigator.userAgent.match(/iphone|ipod|blackberry|android|palm|windows\s+ce/i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment