Skip to content

Instantly share code, notes, and snippets.

@kyupark
Forked from braddown/mobile-browser-detect
Last active June 21, 2018 16:10
Show Gist options
  • Save kyupark/6dc9ad67f8a0e387ac68a290972c3eb2 to your computer and use it in GitHub Desktop.
Save kyupark/6dc9ad67f8a0e387ac68a290972c3eb2 to your computer and use it in GitHub Desktop.
Link for App Download - Mobile OS Detection and Redirect Download Link to Appropriate App Store
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Redirect</title>
<script type="text/javascript"> // <![CDATA[
// iPhone or iPad Version:
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i))) {
window.location = "https://itunes.apple.com/us/app/fkcc/id1364772616?mt=8";
}
// Android Version:
if(navigator.userAgent.match(/android/i)) {
window.location = "https://play.google.com/store/apps/details?id=lgwithj.FKCC";
}
// ELSE
else {
window.location = "http://www.firstkoreanchurch.org/";
}
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment