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

Commit 8eff52e

Browse files
Added support for custom text on 10FastFingers and updated README.md with an anticheat notice
1 parent cfb45db commit 8eff52e

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A JS script to cheat on certain online typing tests.
33

44
## Supported sites
55
As of now, the sites that work are:
6-
- [10FastFingers](https://10fastfingers.com/)
6+
- [10FastFingers](https://10fastfingers.com/) (Normal tests and [custom text](https://10fastfingers.com/text-practice/new))
77
<!-- - [Ratatype](https://www.ratatype.com/) -->
88
<!-- ^^^WIP^^^ -->
99
- [TypingTestNow](https://typingtestnow.com/)
@@ -14,7 +14,12 @@ I am planning to add support for more.
1414
0. Ensure that you're on a supported site
1515
1. Copy [the contents of `typecheat.min.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.min.js).
1616
2. Open the developer console (Ctrl+Shift+J on Chrome/Chromium Edge)
17-
3. Paste the code
17+
3. Paste the code and press enter
1818
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.
1919

2020
**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.**
21+
22+
23+
## Anticheat systems
24+
### 10FastFingers
25+
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.

typecheat.js

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
// Check current site
1919
let url = window.location.href.split("/")[2];
2020
let site = -1;
21+
let altMode = 0;
2122
if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
2223
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~");
2324
site = 0;
24-
// ---------- WIP ----------
25+
if(window.location.href.split("/")[3] == "text") altMode = 1;
2526
// } else if(url == "www.ratatype.com"|| url == "ratatype.com") {
2627
// console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Ratatype\n~~~~~~~~~~~~~~~~~~~");
2728
// site = 1;
@@ -32,7 +33,7 @@ if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
3233

3334
// Cheat
3435
switch(site) {
35-
// 10FastFingers
36+
// 10FastFingers (Normal)
3637
case 0:
3738
// Generate wordlist
3839
let tText = document.getElementById("row1");
@@ -43,39 +44,45 @@ switch(site) {
4344
// Interval
4445
let cWord = 0;
4546
// Make sure to constantly update the field
47+
let tField = null;
48+
if(altMode == 0) {
49+
tField = document.getElementById("inputfield");
50+
} else if(altMode == 1) {
51+
tField = document.getElementById("text_typed");
52+
}
53+
// Different method for different modes
4654
setInterval(function() {
47-
if(document.getElementById("inputfield").value == "") {
48-
document.getElementById("inputfield").value = tWords[cWord];
55+
if(tField.value == "") {
56+
tField.value = tWords[cWord];
4957
cWord++;
5058
}
5159
}, 10);
5260
break;
53-
// ---------- WIP ----------
5461
// Ratatype
55-
/*
56-
* case 1:
57-
* // Generate wordlist
58-
* let text = document.getElementsByClassName("mainTxt")[0];
59-
* let field = document.getElementsByClassName("divTextarea")[0].children[0];
60-
* let words = [];
61-
* for(let i = 0; i < text.children.length; i++) {
62-
* if(text.children[i].innerText != " ") {
63-
* words.push(text.children[i].innerText);
64-
* }
65-
* }
66-
* let i = 1;
67-
* field.value = words[0];
68-
* // Make sure to constantly update the field
69-
* setInterval(function() {
70-
* if(field.value.slice(-1) == " " || !field.value.includes(words[i])) {
71-
* field.value += words[i];
72-
* // Make sure that the word was actually added to the text field
73-
* if(field.value.includes(words[i])) i++;
74-
* console.log(field.value.includes(words[i]));
75-
* }
76-
* }, 10);
77-
* break;
78-
*/
62+
// case 1:
63+
// // Generate wordlist
64+
// let text = document.getElementsByClassName("mainTxt")[0];
65+
// let words = [];
66+
// for(let i = 0; i < text.children.length; i++) {
67+
// if(text.children[i].innerText != " ") {
68+
// words.push(text.children[i].innerText);
69+
// }
70+
// }
71+
// console.log(words);
72+
// // Interval
73+
// let i = 0;
74+
// // Make sure to constantly update the field
75+
// let field = document.getElementsByClassName("divTextarea")[0].children[0];
76+
// let expectedText = "";
77+
// setInterval(function() {
78+
// if(field.value.slice(-1) == " " || field.value == "") {
79+
// if(i > 0) expectedText += " ";
80+
// expectedText += words[i];
81+
// field.value = expectedText;
82+
// i++;
83+
// }
84+
// }, 10);
85+
// break;
7986
// TypingTestNow
8087
case 2:
8188
// Generate wordlist

typecheat.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1717
*/
18-
var url=window.location.href.split("/")[2],site=-1;switch("10fastfingers.com"==url||"www.10fastfingers.com"==url?(console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~"),site=0):"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;setInterval(function(){""==document.getElementById("inputfield").value&&(document.getElementById("inputfield").value=tWords[cWord],cWord++)},10);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;var field=document.getElementById("practice-input");setInterval(function(){" "!=field.value&&""!=field.value||(field.value=words[i],i++)})}
18+
var url=window.location.href.split("/")[2],site=-1,altMode=0;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,tField=null;0==altMode?tField=document.getElementById("inputfield"):1==altMode&&(tField=document.getElementById("text_typed")),setInterval(function(){""==tField.value&&(tField.value=tWords[cWord],cWord++)},10);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;var field=document.getElementById("practice-input");setInterval(function(){" "!=field.value&&""!=field.value||(field.value=words[i],i++)})}

0 commit comments

Comments
 (0)