Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Commit 2f8e19d

Browse files
Updated Tampermonkey version of the script.
1 parent 5cf743a commit 2f8e19d

File tree

4 files changed

+157
-32
lines changed

4 files changed

+157
-32
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ If you go above a certain WPM (not sure exactly what), you will be forced to tak
2222
2. Open the developer console (Ctrl+Shift+J on Chrome/Chromium Edge)
2323
3. Paste the code and press enter
2424
4. The text box will start to autofill the next words as they appear. Simply press `space` as fast as you would like, and the next words will appear as you do.
25+
2526
### Tampermonkey
2627
If you have the [Tampermonkey Extension](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) installed:
2728

2829
1. Click on the tampermonkey icon next to the search bar.
2930
2. Select "Create a new script..."
30-
3. Copy [the contents of `typecheat.tampermonkey.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.tampermonkey.js).
31-
4. Replace the default contents with the contents of `typecheat.tampermonkey.js` (Ctrl+A, then Ctrl+V).
31+
3. Copy [the contents of `typecheat-tampermonkey.min.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat-tampermonkey.min.js).
32+
4. Replace the default contents with the contents of `typecheat-tampermonkey.min.js` (While inside the editor, Ctrl+A then Ctrl+V).
3233
5. Save the script (Ctrl+S).
3334

34-
The script will now autorun on supported sites.
35+
Once you're on a supported site, you should see an button labelled "Start TypeCheat". Click this only when the words have finished loading. The text of the button will appear green when it is active.
36+
37+
On **10FastFingers**, the button appears just **below** the text field.
38+
On **TypingTestNow**, it appears at the **top of the page** just under the navbar.
3539

3640
**Note: On 10FastFingers, if you end up going through the entire text, the words will continue to autofill. If you continue to press space it can cause you to get incorrect words marked, despite the text being over.**

typecheat-tampermonkey.js

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// ==UserScript==
2+
// @name TypeCheat
3+
// @namespace https://github.com/MysteryBlokHed/TypeCheat
4+
// @version v1.0.0-beta.2
5+
// @description A JS script to cheat on certain online typing tests.
6+
// @author Adam Thompson-Sharpe
7+
// @match https://10fastfingers.com/*
8+
// @match https://www.ratatype.com/*
9+
// @match https://typingtestnow.com/*
10+
// @grant none
11+
// ==/UserScript==
12+
/*
13+
* TypeCheat - A JS script to cheat on certain online typing tests
14+
* Copyright (C) 2020 Adam Thompson-Sharpe
15+
*
16+
* This program is free software: you can redistribute it and/or modify
17+
* it under the terms of the GNU General Public License as published by
18+
* the Free Software Foundation, either version 3 of the License, or
19+
* (at your option) any later version.
20+
*
21+
* This program is distributed in the hope that it will be useful,
22+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
* GNU General Public License for more details.
25+
*
26+
* You should have received a copy of the GNU General Public License
27+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
28+
*/
29+
/*
30+
* TypeCheat - A JS script to cheat on certain online typing tests
31+
* Copyright (C) 2020 Adam Thompson-Sharpe
32+
*
33+
* This program is free software: you can redistribute it and/or modify
34+
* it under the terms of the GNU General Public License as published by
35+
* the Free Software Foundation, either version 3 of the License, or
36+
* (at your option) any later version.
37+
*
38+
* This program is distributed in the hope that it will be useful,
39+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
40+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41+
* GNU General Public License for more details.
42+
*
43+
* You should have received a copy of the GNU General Public License
44+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
45+
*/
46+
// Check current site
47+
let url = window.location.href.split("/")[2];
48+
let site = -1;
49+
let altMode = 0;
50+
if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
51+
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~");
52+
site = 0;
53+
if(window.location.href.split("/")[3] == "text") altMode = 1;
54+
} else if(url == "typingtestnow.com" || url == "www.typingtestnow.com") {
55+
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~");
56+
site = 2;
57+
}
58+
59+
// 10FastFingers Cheat Code
60+
function tenFastCheat() {
61+
// Different method for different modes
62+
let tField = null;
63+
if(altMode == 0) {
64+
tField = document.getElementById("inputfield");
65+
} else if(altMode == 1) {
66+
tField = document.getElementById("text_typed");
67+
}
68+
tField.addEventListener("keyup", function(e) {
69+
if(e.keyCode == 32) {
70+
tField.value = tWords[cWord];
71+
cWord++;
72+
}
73+
});
74+
// Change button colour to show that it has activated
75+
document.getElementById("ads-speedtest-view-container").children[0].style = "width: 100%; color: #0F0;";
76+
}
77+
78+
// TypingTestNow Cheat Code
79+
function typingTestNowCheat() {
80+
let field = document.getElementById("practice-input");
81+
field.addEventListener("keydown", function(e) {
82+
if(e.keyCode == 32) {
83+
field.value = words[i];
84+
i++;
85+
}
86+
});
87+
// Change button colour to show that it has activated
88+
document.getElementsByClassName("row")[0].children[0].style = "width: 100%; color: #0F0;";
89+
}
90+
91+
// Cheat
92+
switch(site) {
93+
// 10FastFingers (Normal)
94+
case 0:
95+
// Generate wordlist
96+
var tText = document.getElementById("row1");
97+
var tWords = [];
98+
for(let i = 0; i < tText.children.length; i++) {
99+
tWords.push(tText.children[i].innerText);
100+
}
101+
// Interval
102+
var cWord = 0;
103+
// Create cheat button
104+
document.getElementById("ads-speedtest-view-container").innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:tenFastCheat();\">Start TypeCheat</button>";
105+
break;
106+
// TypingTestNow
107+
case 2:
108+
// Generate wordlist
109+
let text = document.getElementsByClassName("sample-text")[0];
110+
var words = [];
111+
for(let i = 0; i < text.children.length; i++) {
112+
for(let j = 0; j < text.children[i].children.length; j++) {
113+
words.push(text.children[i].children[j].innerText);
114+
}
115+
}
116+
// Interval
117+
var i = 0;
118+
// Create cheat button
119+
document.getElementsByClassName("row")[0].innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:typingTestNowCheat();\">Start TypeCheat</button>"
120+
break;
121+
}

typecheat-tampermonkey.min.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// ==UserScript==
2+
// @name TypeCheat
3+
// @namespace https://github.com/MysteryBlokHed/TypeCheat
4+
// @version v1.0.0-beta.2
5+
// @description A JS script to cheat on certain online typing tests.
6+
// @author Adam Thompson-Sharpe
7+
// @match https://10fastfingers.com/*
8+
// @match https://www.ratatype.com/*
9+
// @match https://typingtestnow.com/*
10+
// @grant none
11+
// ==/UserScript==
12+
/*
13+
* TypeCheat - A JS script to cheat on certain online typing tests
14+
* Copyright (C) 2020 Adam Thompson-Sharpe
15+
*
16+
* This program is free software: you can redistribute it and/or modify
17+
* it under the terms of the GNU General Public License as published by
18+
* the Free Software Foundation, either version 3 of the License, or
19+
* (at your option) any later version.
20+
*
21+
* This program is distributed in the hope that it will be useful,
22+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24+
* GNU General Public License for more details.
25+
*
26+
* You should have received a copy of the GNU General Public License
27+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
28+
*/
29+
var url=window.location.href.split("/")[2],site=-1,altMode=0;function tenFastCheat(){var t=null;0==altMode?t=document.getElementById("inputfield"):1==altMode&&(t=document.getElementById("text_typed")),t.addEventListener("keyup",function(e){32==e.keyCode&&(t.value=tWords[cWord],cWord++)}),document.getElementById("ads-speedtest-view-container").children[0].style="width: 100%; color: #0F0;"}function typingTestNowCheat(){var t=document.getElementById("practice-input");t.addEventListener("keydown",function(e){32==e.keyCode&&(t.value=words[i],i++)}),document.getElementsByClassName("row")[0].children[0].style="width: 100%; color: #0F0;"}switch("10fastfingers.com"==url||"www.10fastfingers.com"==url?(console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~"),site=0,"text"==window.location.href.split("/")[3]&&(altMode=1)):"typingtestnow.com"!=url&&"www.typingtestnow.com"!=url||(console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~"),site=2),site){case 0:for(var tText=document.getElementById("row1"),tWords=[],i=0;i<tText.children.length;i++)tWords.push(tText.children[i].innerText);var cWord=0;document.getElementById("ads-speedtest-view-container").innerHTML='<button style="width: 100%;" onclick="javascript:tenFastCheat();">Start TypeCheat</button>';break;case 2:var text=document.getElementsByClassName("sample-text")[0],words=[];for(i=0;i<text.children.length;i++)for(var j=0;j<text.children[i].children.length;j++)words.push(text.children[i].children[j].innerText);i=0;document.getElementsByClassName("row")[0].innerHTML='<button style="width: 100%;" onclick="javascript:typingTestNowCheat();">Start TypeCheat</button>'}

typecheat.tampermonkey.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)