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

Commit 59ee571

Browse files
Added instructions and file to run with Tampermonkey.
1 parent 8eff52e commit 59ee571

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,22 @@ As of now, the sites that work are:
1111
I am planning to add support for more.
1212

1313
## Use
14+
### Copy+Paste
1415
0. Ensure that you're on a supported site
1516
1. Copy [the contents of `typecheat.min.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.min.js).
1617
2. Open the developer console (Ctrl+Shift+J on Chrome/Chromium Edge)
1718
3. Paste the code and press enter
1819
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.
20+
### Tampermonkey
21+
If you have the [Tampermonkey Extension](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) installed:
22+
23+
1. Click on the tampermonkey icon next to the search bar.
24+
2. Select "Create a new script..."
25+
3. Copy [the contents of `typecheat.tampermonkey.js`](https://raw.githubusercontent.com/MysteryBlokHed/TypeCheat/master/typecheat.tampermonkey.js).
26+
4. Replace the default contents with the contents of `typecheat.tampermonkey.js` (Ctrl+A, then Ctrl+V).
27+
5. Save the script (Ctrl+S).
28+
29+
The script will now autorun on supported sites.
1930

2031
**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.**
2132

typecheat.tampermonkey.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.1
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;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)