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

Commit 6bc3e07

Browse files
Added support for TypeRacer and removed unfinished Ratatype code.
1 parent b29b0a3 commit 6bc3e07

File tree

6 files changed

+93
-103
lines changed

6 files changed

+93
-103
lines changed

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ A JS script to cheat on certain online typing tests.
44
## Supported sites
55
As of now, the sites that work are:
66
- [10FastFingers](https://10fastfingers.com/) (Normal tests and [custom text](https://10fastfingers.com/text-practice/new))
7-
<!-- - [Ratatype](https://www.ratatype.com/) -->
8-
<!-- ^^^WIP^^^ -->
7+
- [TypeRacer](https://play.typeracer.com/)
98
- [TypingTestNow](https://typingtestnow.com/)
109

1110
I am planning to add support for more.
@@ -15,26 +14,22 @@ I am planning to add support for more.
1514
If you go above a certain WPM (not sure exactly what), you will be forced to take an anticheat test to confirm your result. The timer starts as soon as you press the "Start" button, and is a randomly generated image instead of a normal text-based system.
1615
**If you use TypeCheat too much/at all on 10FastFingers, you will get banned from the site. I recommend using an alternate account for this, as if it's banned you can just delete and re-create it.**
1716

17+
### TypeRacer
18+
If you go moderately fast, you will get a message asking you to do a test to confirm your score.
19+
If you go too fast, an alert box will appear saying that they believe you have cheated.
20+
1821
## Use
19-
### Copy+Paste
2022
0. Ensure that you're on a supported site
21-
1. Copy [the contents of `typecheat.min.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.min.js).
23+
1. Copy the contents of [`typecheat.min.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.min.js) or [`typecheat-button.min.js`]. The first will instantly run the code, and the other will create a button to be pressed first.
2224
2. Open the developer console (Ctrl+Shift+J on Chrome/Chromium Edge)
2325
3. Paste the code and press enter
2426
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.
2527

26-
### Tampermonkey
27-
If you have the [Tampermonkey Extension](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) installed:
28-
29-
1. Click on the tampermonkey icon next to the search bar.
30-
2. Select "Create a new script..."
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).
33-
5. Save the script (Ctrl+S).
34-
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.
28+
**Note: On TypeRacer, the code must be run after a race has been entered. It will not work on the main page.**
3629

30+
### If you're using `typecheat-button.min.js`
3731
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.
32+
On **TypeRacer**, the button appears **in the navbar** above the "Blog, Forum, Pit Stop, About" buttons.
33+
On **TypingTestNow**, the button appears at the **top of the page** just under the navbar.
3934

4035
**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 renamed to typecheat-button.js

Lines changed: 45 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
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 hackermancool
7-
// @match https://10fastfingers.com/*
8-
// @match https://www.ratatype.com/*
9-
// @match https://typingtestnow.com/*
10-
// @grant none
11-
// ==/UserScript==
121
/*
132
* TypeCheat - A JS script to cheat on certain online typing tests
14-
* Copyright (C) 2020 Adam Thompson-Sharpe
3+
* Copyright (C) 2020 hackermancool
154
*
165
* This program is free software: you can redistribute it and/or modify
176
* it under the terms of the GNU General Public License as published by
@@ -51,13 +40,24 @@ if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
5140
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~");
5241
site = 0;
5342
if(window.location.href.split("/")[3] == "text") altMode = 1;
43+
} else if(url == "play.typeracer.com" || url == "typeracer.com") {
44+
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~");
45+
site = 1;
5446
} else if(url == "typingtestnow.com" || url == "www.typingtestnow.com") {
5547
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~");
5648
site = 2;
5749
}
5850

5951
// 10FastFingers Cheat Code
6052
function tenFastCheat() {
53+
// Generate wordlist
54+
let tText = document.getElementById("row1");
55+
let tWords = [];
56+
for(let i = 0; i < tText.children.length; i++) {
57+
tWords.push(tText.children[i].innerText);
58+
}
59+
// Interval
60+
let cWord = 0;
6161
// Different method for different modes
6262
let tField = null;
6363
if(altMode == 0) {
@@ -75,8 +75,36 @@ function tenFastCheat() {
7575
document.getElementById("ads-speedtest-view-container").children[0].style = "width: 100%; color: #0F0;";
7676
}
7777

78+
// TypeRacer Cheat Code
79+
function typeRacerCheat() {
80+
// Generate wordlist
81+
let textElement = document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td");
82+
let wordlist = textElement.innerText.split(" ");
83+
// Interval
84+
let crWord = 0;
85+
let textField = document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input");
86+
textField.addEventListener("keydown", function(e) {
87+
if(e.keyCode == 32) {
88+
textField.value = wordlist[crWord];
89+
crWord++;
90+
}
91+
});
92+
// Change button colour to show that it has activated
93+
document.getElementsByClassName("navigation")[0].children[0].style = "width: 100%; color: #0F0;";
94+
}
95+
7896
// TypingTestNow Cheat Code
7997
function typingTestNowCheat() {
98+
// Generate wordlist
99+
let text = document.getElementsByClassName("sample-text")[0];
100+
let words = [];
101+
for(let i = 0; i < text.children.length; i++) {
102+
for(let j = 0; j < text.children[i].children.length; j++) {
103+
words.push(text.children[i].children[j].innerText);
104+
}
105+
}
106+
// Interval
107+
var i = 0;
80108
let field = document.getElementById("practice-input");
81109
field.addEventListener("keydown", function(e) {
82110
if(e.keyCode == 32) {
@@ -92,29 +120,16 @@ function typingTestNowCheat() {
92120
switch(site) {
93121
// 10FastFingers (Normal)
94122
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;
103123
// Create cheat button
104124
document.getElementById("ads-speedtest-view-container").innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:tenFastCheat();\">Start TypeCheat</button>";
105125
break;
126+
// TypeRacer
127+
case 1:
128+
// Create cheat button
129+
document.getElementsByClassName("navigation")[0].innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:typeRacerCheat();\">Start TypeCheat</button>" + document.getElementsByClassName("navigation")[0].innerHTML;
130+
break;
106131
// TypingTestNow
107132
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;
118133
// Create cheat button
119134
document.getElementsByClassName("row")[0].innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:typingTestNowCheat();\">Start TypeCheat</button>"
120135
break;

typecheat-button.min.js

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typecheat-tampermonkey.min.js

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

typecheat.js

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
2323
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~");
2424
site = 0;
2525
if(window.location.href.split("/")[3] == "text") altMode = 1;
26-
// } else if(url == "www.ratatype.com"|| url == "ratatype.com") {
27-
// console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Ratatype\n~~~~~~~~~~~~~~~~~~~");
28-
// site = 1;
26+
} else if(url == "play.typeracer.com" || url == "typeracer.com") {
27+
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~");
28+
site = 1;
2929
} else if(url == "typingtestnow.com" || url == "www.typingtestnow.com") {
3030
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~");
3131
site = 2;
@@ -35,6 +35,7 @@ if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
3535
switch(site) {
3636
// 10FastFingers (Normal)
3737
case 0:
38+
console.log("BROKEN");
3839
// Generate wordlist
3940
let tText = document.getElementById("row1");
4041
let tWords = [];
@@ -57,31 +58,21 @@ switch(site) {
5758
}
5859
});
5960
break;
60-
// Ratatype
61-
// case 1:
62-
// // Generate wordlist
63-
// let text = document.getElementsByClassName("mainTxt")[0];
64-
// let words = [];
65-
// for(let i = 0; i < text.children.length; i++) {
66-
// if(text.children[i].innerText != " ") {
67-
// words.push(text.children[i].innerText);
68-
// }
69-
// }
70-
// console.log(words);
71-
// // Interval
72-
// let i = 0;
73-
// // Make sure to constantly update the field
74-
// let field = document.getElementsByClassName("divTextarea")[0].children[0];
75-
// let expectedText = "";
76-
// setInterval(function() {
77-
// if(field.value.slice(-1) == " " || field.value == "") {
78-
// if(i > 0) expectedText += " ";
79-
// expectedText += words[i];
80-
// field.value = expectedText;
81-
// i++;
82-
// }
83-
// }, 10);
84-
// break;
61+
// TypeRacer
62+
case 1:
63+
// Generate wordlist
64+
let textElement = document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td");
65+
let wordlist = textElement.innerText.split(" ");
66+
// Interval
67+
let crWord = 0;
68+
let textField = document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input");
69+
textField.addEventListener("keydown", function(e) {
70+
if(e.keyCode == 32) {
71+
textField.value = wordlist[crWord];
72+
crWord++;
73+
}
74+
});
75+
break;
8576
// TypingTestNow
8677
case 2:
8778
// Generate wordlist

0 commit comments

Comments
 (0)