-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
74 lines (68 loc) · 3.78 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
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirect | kot.la</title>
<script>
/*PATH*/
path = document.location.pathname
if (path.startsWith("/")) {
path = path.replace("/","")
}
path = path.replace(/\.[^/.]+$/, "")
path = path.toLowerCase()
async function getIssues() {
/*REQUESTS*/
let headersList = {
"Accept": "*/*",
}
let response = await fetch("https://api.github.com/repos/GameDesert/redirect/issues", {
method: "GET",
headers: headersList
});
let data = await response.json();
/*ID ISSUES*/
var issue_count = await data.length;
for (var issue = 0; issue < issue_count; issue++) {
if (data[issue]["user"]["id"] == 56128805) {
if (data[issue]["title"] == path) {
if (/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/.test(data[issue]["body"]) == true) {
document.getElementById("manual").setAttribute("href",data[issue]["body"])
window.location.replace(data[issue]["body"]);
break;
} else if (/^(?:mailto:[a-z]+@(?:kotla.eu)|(?:kot.la))$/.test(data[issue]["body"]) == true) {
document.getElementById("title").innerText = "YOUR CHOSEN EMAIL CLIENT IS OPENING"
addr = data[issue]["body"].match(/^(?:mailto:([a-z]+@(?:kotla.eu)|(?:kot.la)))$/)[1]
document.getElementById("manual").setAttribute("href",data[issue]["body"])
document.getElementById("subtitle").innerText = `YOU ARE WRITING AN EMAIL TO ${addr}`
window.location.replace(data[issue]["body"]);
break;
// ^(?:mailto:[a-z]+@(?:kotla.eu)|(?:kot.la))$
} else if (/geo:-?[0-9.]+,-?[0-9.]+/.test(data[issue]["body"]) == true) {
document.getElementById("title").innerText = "YOUR CHOSEN MAP CLIENT IS OPENING"
coord = data[issue]["body"].match(/geo:(-?[0-9.]+,-?[0-9.]+)/)[1]
document.getElementById("manual").setAttribute("href",data[issue]["body"])
document.getElementById("subtitle").innerText = `THE SPECIFIED LOCATION IS ${coord}`
window.location.replace(data[issue]["body"]);
break;
}
}
}
if (issue >= issue_count-1) {
document.getElementById("title").innerHTML = "YOU ARE <span style='text-decoration: underline;'>NOT</span> BEING REDIRECTED"
document.getElementById("subtitle").innerText = `THE LINK '${path}' IS NOT A VALID LINK`
document.getElementById("manual").style.display = "none";
}
}
}
getIssues()
</script>
</head>
<body style="background: linear-gradient(to bottom right, #000014, #000); background-size: 100vw 100vh;">
<h1 id="title" style="text-align: center; font-family: sans-serif; color: #fff;">YOU ARE BEING REDIRECTED</h1>
<h2 id="subtitle" style="text-align: center; font-family: sans-serif; color: #fff;">PLEASE STAND BY</h2>
<br>
<a href="" id="manual" style="color: #fff; font-family: sans-serif; text-align: center; margin-left: auto; margin-right: auto; display: block;">CLICK HERE TO REDIRECT MANUALLY</a>
</body>
</html>