Last active
August 29, 2015 14:02
-
-
Save fastcodecoq/cc50796d6a0165f4c516 to your computer and use it in GitHub Desktop.
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
| window.navigator = window.navigator || {}; | |
| window.esMovil = navigator.userAgent ? /android|ios|firefoxos|blackberry|tyzen|webos|phone|mobile/g.test(navigator.userAgent.toLowerCase()) : null; | |
| //USO | |
| // alert( esMovil ? 'Soy un móvil' : 'No soy un móvil :/' ) ; | |
| // if(esMovil) console.log('Soy un móvil') else console.log('No soy un móvil :/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment