Created
April 3, 2012 03:16
-
-
Save jboesch/2289031 to your computer and use it in GitHub Desktop.
Detect Sencha Touch supported phone
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
/** | |
* Are we running a sencha touch supported phone? Needed | |
* primarily for login page | |
* Sencha supports: iPhone, iPod touch, Android, Blackberry 6+ | |
*/ | |
var isSenchaTouchSupportedPhone = function() | |
{ | |
var ua = navigator.userAgent; | |
var supported = ( | |
ua.match(/iPhone/i) || | |
ua.match(/iPod/i) || | |
ua.match(/Android/i) || | |
(ua.match(/BlackBerry/i) && ua.match(/Version\//i)) // BB 6+ | |
); | |
return supported; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment