Last active
December 28, 2015 06:59
-
-
Save juandiegoh/7460686 to your computer and use it in GitHub Desktop.
Redirect Mobile devices from JavaScript
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
<script type="text/javascript"> | |
var ios = (/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase())); | |
if (ios) { | |
document.location = "https://itunes.apple.com/us/app/moviz-guess-the-movie/id705337240?l=es&ls=1&mt=8"; | |
} | |
var android = (/android/i.test(navigator.userAgent.toLowerCase())); | |
if(android) { | |
document.location = "https://play.google.com/store/apps/details?id=com.app.android.moviequiz"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment