This repository has been archived by the owner on Jul 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypecheat-button.js
290 lines (281 loc) · 10.2 KB
/
typecheat-button.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
/*
* TypeCheat - A JS script to cheat on certain online typing tests
* Copyright (C) 2020 hackermancool
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Check current site
let url = window.location.href.split('/')[2].replace('www.', '');
let site = -1;
let altMode = 0;
switch(url) {
case '10fastfingers.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~');
site = 0;
if(window.location.href.split('/')[3] == 'text') altMode = 1;
break;
case 'typeracer.com':
case 'play.typeracer.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~');
site = 1;
break;
case 'typingtestnow.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~');
site = 2;
break;
case 'bing.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~');
site = 3;
break;
case 'livechat.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: LiveChat\n~~~~~~~~~~~~~~~~~~~');
site = 4;
break;
case 'quicktypingtest.com':
console.log(' ~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: QuickTypingTest\n ~~~~~~~~~~~~~~~~~~~');
site = 5;
break;
case 'typing-speed-test.aoeu.eu':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: AOEU Test\n~~~~~~~~~~~~~~~~~~~');
site = 6;
break;
case 'indiatyping.com':
console.log('~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: India Typing\n~~~~~~~~~~~~~~~~~~~');
site = 7;
break;
}
// Variables
let tText, tWords, cWord, tField, workWord;
// 10FastFingers
function tenFastCheat() {
// Generate wordlist
tText = document.getElementById('row1');
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
tWords.push(tText.children[i].innerText);
}
// Cheat
cWord = 0;
// Different method for different modes
tField = null;
if(altMode == 0) {
tField = document.getElementById('inputfield');
} else if(altMode == 1) {
tField = document.getElementById('text_typed');
}
tField.addEventListener('keyup', function(e) {
if(e.keyCode == 32) {
tField.value = tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementById('ads-speedtest-view-container').children[0].style = 'width: 100%; color: #0F0;';
}
// TypeRacer
function typeRacerCheat() {
// Generate wordlist
tText = document.querySelector('.inputPanel').firstChild.firstChild.firstChild.firstChild.firstChild.firstChild;
tWords = tText.innerText.split(' ');
// Cheat
cWord = 0;
tField = document.querySelector('.txtInput');
tField.addEventListener('keydown', function(e) {
if(e.keyCode == 32) {
tField.value = tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementsByClassName('navigation')[0].children[0].style = 'width: 100%; color: #0F0;';
}
// TypingTestNow
function typingTestNowCheat() {
// Generate wordlist
tText = document.getElementsByClassName('sample-text')[0];
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
for(let j = 0; j < tText.children[i].children.length; j++) {
tWords.push(tText.children[i].children[j].innerText);
}
}
// Cheat
cWord = 0;
tField = document.getElementById('practice-input');
tField.addEventListener('keydown', function(e) {
if(e.keyCode == 32) {
tField.value = tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementsByClassName('row')[0].children[0].style = 'width: 100%; color: #0F0;';
}
// Bing Typing Test
function bingCheat() {
// Generate wordlist
tText = document.getElementById('edu_promptText');
tWords = [];
let workWord = '';
for(let i = 0; i < tText.children.length; i++) {
for(let j = 0; j < tText.children[i].children.length; j++) {
if(tText.children[i].children[j].className == 'space') {
tWords.push(workWord);
workWord = '';
} else {
workWord += tText.children[i].children[j].innerText;
}
}
}
// Cheat
cWord = 0;
tField = document.getElementById('edu_inputText');
tField.addEventListener('keydown', function(e) {
if(e.keyCode == 32) {
tField.value += tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementById('edu_answer').children[0].children[0].getElementsByTagName('button')[0].style = 'color: #0F0;';
}
// LiveChat
function liveChatCheat() {
// Generate wordlist
tText = document.getElementsByClassName('tst-input-wrapper')[1];
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
tWords.push(tText.children[i].innerText);
}
// Cheat
cWord = 0;
tField = document.getElementById('test-input');
tField.addEventListener('keydown', function(e) {
if(e.keyCode == 32) {
tField.innerText = tWords[cWord];
cWord++;
// The wordlist constantly updates
if(tText.lastChild.innerText != tWords.slice(-1)) {
tWords.push(tText.lastChild.innerText);
}
}
});
// Change button colour to show that it has activated
document.querySelector('.u-flex.u-flex-col-rev').children[2].style = 'color: #0F0;';
}
// QuickTypingTest
function quickTypingCheat() {
// Generate wordlist
tText = document.querySelector('#text-display');
tWords = [];
workWord = '';
for(let i = 0; i < tText.children.length; i++) {
workWord = '';
for(let j = 0; j < tText.children[i].children.length; j++) {
workWord += tText.children[i].children[j].innerText;
}
tWords.push(workWord);
}
// Cheat
cWord = 0;
tField = document.getElementById('text-input');
tField.addEventListener('keydown', function(e) {
if(e.keyCode == 32) {
tField.value += tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementById('navbarResponsive').children[0].style = 'width: 100%; color: #0F0;';
}
// AOEU Typing Speed Test
function aoeuCheat() {
// Generate wordlist
tText = document.getElementById('words');
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
tWords.push(tText.children[i].innerText);
}
// Cheat
cWord = 0;
tField = document.getElementById('input');
tField.addEventListener('keyup', function(e) {
if(e.keyCode == 32) {
tField.value = tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementById('score').lastChild.style = 'color: #0F0;';
}
// India Typing
function indiaTypingCheat() {
// Generate wordlist
tText = document.getElementById('blockrandom').contentDocument.getElementById('unicodeText');
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
tWords.push(tText.children[i].innerText);
}
// Cheat
cWord = 0;
tField = document.getElementById('blockrandom').contentDocument.getElementById('toType');
tField.addEventListener('keyup', function(e) {
if(e.keyCode == 32) {
tField.value += tWords[cWord];
cWord++;
}
});
// Change button colour to show that it has activated
document.getElementsByClassName('t3-sidebar')[0].children[0].style = 'color: #0F0;';
}
// Cheat
switch(site) {
// 10FastFingers (Normal)
case 0:
// Create cheat button
document.getElementById('ads-speedtest-view-container').innerHTML = '<button style="width: 100%;" onclick="tenFastCheat();">Start TypeCheat</button>';
break;
// TypeRacer
case 1:
// Create cheat button
document.getElementsByClassName('navigation')[0].innerHTML = '<button style="width: 50%;" onclick="typeRacerCheat();">Start TypeCheat</button>' + document.getElementsByClassName('navigation')[0].innerHTML;
break;
// TypingTestNow
case 2:
// Create cheat button
document.getElementsByClassName('row')[0].innerHTML = '<button style="width: 100%;" onclick="typingTestNowCheat();">Start TypeCheat</button>'
break;
// Bing Typing Test
case 3:
// Create cheat button
document.getElementById('edu_answer').children[0].children[0].innerHTML += '<button onclick="bingCheat();">Start TypeCheat</button>';
break;
// LiveCheat Inc
case 4:
// Create cheat button
document.querySelector('.u-flex.u-flex-col-rev').innerHTML += '<button onclick="liveChatCheat();">Start TypeCheat</button>';
break;
// QuickTypingTest
case 5:
document.getElementById('navbarResponsive').innerHTML = '<button style="width: 100%;" onclick="quickTypingCheat();">Start TypeCheat</button>' + document.getElementById('navbarResponsive').innerHTML;
break;
// AOEU Typing Speed Test
case 6:
document.getElementById('score').innerHTML += '<button onclick="aoeuCheat();">Start TypeCheat</button>';
break;
// India Typing
case 7:
document.getElementsByClassName('t3-sidebar')[0].innerHTML = '<button onclick="indiaTypingCheat();">Start TypeCheat</button>';
break;
}