-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautotermo.js
81 lines (77 loc) · 2.79 KB
/
autotermo.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
async function treme() {
sites = ["https://term.ooo/","https://term.ooo/2/","https://term.ooo/4/"];
response = await fetch(
'https://gist.githubusercontent.com/un-versed/6373912fbf4649704b6823ea696cfcb1/raw/629137a0d0c7160b94c35013df8d570b31100174/termooo-wordsv2.json', {
method: 'GET'
});
words = await response.json();
values = Object.values(words);
randomValue = values[parseInt(Math.random() * values.length)];
tre = Array.from(randomValue);
for (i in tre) {
document.querySelector("body>wc-kbd").shadowRoot.querySelector("#kbd_" + tre[i] + "").click();
}
document.querySelector("body>wc-kbd").shadowRoot.querySelector("#kbd_enter").click();
if (window.location.href != sites[1]){
window.location.href = sites[1];
}
if (window.location.href == sites[1]) {
setTimeout(function () {
normSolutiont = JSON.parse(window.localStorage.termo).state;
}, 3000);
}
if (window.location.href == sites[2]) {
treme();
setTimeout(function () {
normSolutionduo = JSON.parse(window.localStorage.duo).state;
}, 3000);
}
if (window.location.href == sites[3]) {
setTimeout(function () {
normSolutionquatro = JSON.parse(window.localStorage.quatro).state;
}, 3000);
}
};
function preenche(lk){
for (i in lk) {
document.querySelector("body>wc-kbd").shadowRoot.querySelector("#kbd_" + lk[i] + "").click();
}
document.querySelector("body>wc-kbd").shadowRoot.querySelector("#kbd_enter").click();
}
if (window.location.href == "https://term.ooo/") {
treme();
setTimeout(function () {
lk = Array.from(normSolutiont[0].normSolution);
preenche(lk);
}, 6000);
}
if (window.location.href == "https://term.ooo/2/") {
treme();
setTimeout(function () {
lk = Array.from(normSolutionduo[0].normSolution);
preenche(lk);
setTimeout(function () {
lk = Array.from(normSolutionduo[1].normSolution);
preenche(lk);
}, 4000);
}, 6000);
}
if (window.location.href == "https://term.ooo/4/") {
treme();
setTimeout(function () {
lk = Array.from(normSolutionquatro[0].normSolution);
preenche(lk);
setTimeout(function () {
lk = Array.from(normSolutionquatro[1].normSolution);
preenche(lk);
setTimeout(function () {
lk = Array.from(normSolutionquatro[2].normSolution);
preenche(lk);
setTimeout(function () {
lk = Array.from(normSolutionquatro[3].normSolution);
preenche(lk);
}, 4000);
}, 4000);
}, 4000);
}, 4000);
}