You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8" /> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
<title>Document</title> |
|
</head> |
|
<body> |
|
<script> |
|
function getMobileOS() { |
|
const userAgent = |
|
navigator.userAgent || navigator.vendor || window.opera; |
|
|
|
// 判断是否为 iOS |
|
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { |
|
return "iOS"; |
|
} |
|
|
|
// 判断是否为 Android |
|
if (/android/i.test(userAgent)) { |
|
return "Android"; |
|
} |
|
|
|
// 如果都不是,可以返回其他或未知 |
|
return "Unknown"; |
|
} |
|
|
|
const os = getMobileOS(); |
|
|
|
if (os === "iOS") { |
|
setTimeout(() => { |
|
window.location.href = "https://download.brainnel.com"; |
|
}, 1000); |
|
} else { |
|
setTimeout(() => { |
|
window.location.href = |
|
"intent://open#Intent;scheme=com.brainnel.app;package=com.brainnel.app;end"; |
|
}, 1000); |
|
} |
|
</script> |
|
</body> |
|
</html>
|
|
|