Repository navigation
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (32 loc) · 1.56 KB
/
Copy pathindex.js
File metadata and controls
34 lines (32 loc) · 1.56 KB
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
function getURL() {
return new URLSearchParams(window.location.search).get("id");
}
async function redirect(ID) {
const list = await fetch("index.json").then(response => response.json());
if (list[ID]) {
const spanname = document.createElement('span');
spanname.id = "name";
spanname.textContent = list[ID]["name"];
setTimeout(() => {
document.querySelector("body").querySelector("span").parentNode.insertBefore(spanname, document.querySelector("body").querySelector("span").nextSibling); setOwO();
setTimeout(() => {
window.location.href = list[ID]["redir"];
}, 1000);
}, Math.random()*1500);
} else {
const spanname = document.createElement('span');
spanname.id = "name";
spanname.textContent = "deadcode";
setTimeout(() => {
document.querySelector("body").querySelector("span").parentNode.insertBefore(spanname, document.querySelector("body").querySelector("span").nextSibling); setOwO(12);
setTimeout(() => {
window.location.href = "https://deadcode.is-a.dev/";
}, 1000);
}, Math.random()*1500);
}
}
function setOwO(predefinedOwO) {
const owo = ["owo", "OwO", "oWo", "Ōwò", "uwu", "UwU", "uWu", "iwi", "qwq", "pwp", "TwT", "тwт", "TmT", "тmт", "ôWô", "òwó", "ùwú", ">w<", "-w-", ">m<", "omo", "OmO", "umu", "UmU", "-m-", "owø", "^w^"];
document.querySelector("uwu").textContent = owo[predefinedOwO] || owo[Math.round(Math.random() * owo.length)];
}
redirect(getURL());