Created
June 23, 2021 11:11
-
-
Save lawreyios/ec76d4293dc176b308d2dd957396c34c 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
<script> | |
var redirectToApp = function () { | |
setTimeout(function appNotInstalled() { | |
window.location.replace("[Somewhere else like your youtube ad]"); | |
}, 100); | |
window.location.replace("[iOS App Store URL]"); | |
}; if (/iPad|iPhone|iPod/.test(navigator.userAgent)) { | |
window.location.replace("[iOS App Store URL]"); | |
} else if (/android/i.test(navigator.userAgent)) { | |
window.location.replace("[Android Play Store URL]"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment