-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredirect.html
36 lines (36 loc) · 1022 Bytes
/
redirect.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
<html>
<head></head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/custom-protocol-check.min.js"></script>
<script src="assets/js/download-manager.js"></script>
<script>
function checkProtocol() {
let urlParams = new URLSearchParams(window.location.search);
let customUrl = "ink://collaborate?" + urlParams.toString();
customProtocolCheck(
customUrl,
() => {
getProtocol();
},
() => {
console.log(
"Custom protocol found, redirected to ununu",
customUrl
);
}
);
}
function getProtocol() {
if (
confirm(
"We can't find ununu on your system. Do you want to install ununu now?"
)
) {
downloadRedirect();
}
}
checkProtocol();
</script>
<a href="#" onclick="checkProtocol()">Click here if nothing happens...</a>
</body>
</html>