Created
July 2, 2014 16:07
-
-
Save goldalworming/c2397d16ae002c512531 to your computer and use it in GitHub Desktop.
detect mobile in total.js
This file contains 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
var regMobile = /iPad|iPhone|iPod|Android/g; | |
if (regMobile.test(controller.req.headers['user-agent'])) | |
console.log('Is mobile device'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment