-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
36 lines (32 loc) · 936 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script>
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
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=com.michaelyu.cardFlash";
} else if (os == "iOS") {
window.location.href = "https://apps.apple.com/app/id6443405970";
} else {
window.location.href = "https://github.com/amichaelyu/cardFlash";
}
}
</script>
</head>
<body onload="DetectAndServe()">
</body>
</html>