Skip to content

Instantly share code, notes, and snippets.

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