Last active
November 23, 2023 20:51
-
-
Save hooftly/550af4783e30d808a17dcb8f89bfd371 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script> | |
function getMobileOperatingSystem() { | |
var userAgent = navigator.userAgent || navigator.vendor || window.opera; | |
// Windows Phone must come first because its UA also contains "Android" | |
if (/windows phone/i.test(userAgent)) { | |
return "Windows Phone"; | |
} | |
if (/android/i.test(userAgent)) { | |
return "Android"; | |
} | |
// iOS detection from: http://stackoverflow.com/a/9039885/177710 | |
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { | |
return "iOS"; | |
} | |
return "unknown"; | |
}</script> | |
<script> | |
function DetectAndServe(){ | |
let os = getMobileOperatingSystem(); | |
if (os == "Android") { | |
window.location.href = "https://play.google.com/store/apps/details?id=network.fundamenta.mobile"; | |
} else if (os == "iOS") { | |
window.location.href = "https://apps.apple.com/au/app/fundamenta-mobile/id1613465164"; | |
} else { | |
window.location.href = "http://fundamenta.network"; | |
} | |
} | |
</script> | |
</head> | |
<body onload="DetectAndServe()"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment