Skip to content

Instantly share code, notes, and snippets.

@jboesch
Created April 3, 2012 03:16
Show Gist options
  • Save jboesch/2289031 to your computer and use it in GitHub Desktop.
Save jboesch/2289031 to your computer and use it in GitHub Desktop.
Detect Sencha Touch supported phone
/**
* 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