-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path404.html
61 lines (56 loc) · 1.84 KB
/
404.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
permalink: /404.html
---
<!doctype html>
<html>
<head>
<title>Bans.Page</title>
<meta name="description" content="The Bans Page. Ban stages from premade or custom stagelists." />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<script src="/js/constants.js"></script>
<script>
window.onload = function () {
try {
let isRedirect = false;
let redirectLink = "";
let s = window.location.href;
let hash = s.toLowerCase();
hash = hash.replace("https://", "");
hash = hash.replace("http://", "");
hash = hash.replace("bans.page", "");
hash = hash.replace("banspage.github.io", "");
hash = hash.replace(/\//g, "");
console.log("hash: " + hash);
let keys = Object.keys(dataMap);
for (let i = 0; i < keys.length; i++) {
let key = keys[i].toLowerCase();
let valid = key.startsWith(hash) && hash.length > 1;
if (valid && redirectLink == "") { //ze will redirect to ZeRo, but not z
isRedirect = true;
console.log(keys[i]);
redirectLink = "./index.html#" + dataMap[keys[i]];
console.log("dataMap: " + dataMap[keys[i]]);
break;
}
}
console.log(isRedirect);
console.log("redirectLink: " + redirectLink);
if (isRedirect) {
window.location.href = redirectLink;
} else {
window.location.href = "./index.html";
}
} catch (e) {
console.log(e);
window.location.href = "./index.html";
}
}
</script>
</head>
<body style="font-size: 14px; font-family: monospace;">
Redirecting...
<noscript>This 404 page uses JavaScript to redirect you. You have JavaScript disabled -- <a href="https://bans.page">feel free to visit the homepage.</a></noscript>
</body>
</html>