Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Simple regex/user agent mobile checker
* about 99% accurate when compared to 175k sessions in GA
*/
function isMobile()
{
return window.navigator.match(/Mobi|Touch|OperaMini|Android/)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.