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

Commit

Permalink
Added support for QuickTypingTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
MysteryBlokHed committed Feb 17, 2020
1 parent f7cc5bf commit 3597cf5
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 34 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ As of now, the sites that work are:
- [TypingTestNow](https://typingtestnow.com/)
- [Bing Typing Test](https://www.bing.com/search?q=typing+test)
- [LiveChat Inc](https://www.livechatinc.com/typing-speed-test)
- [QuickTypingTest](https://www.quicktypingtest.com/)

I am planning to add support for more.
I am planning to add support for more.

## Anticheat systems
### 10FastFingers
Expand All @@ -20,6 +21,10 @@ If you go above a certain WPM (not sure exactly what), you will be forced to tak
If you go moderately fast (>100 wpm), you will get a message asking you to do a test to confirm your score.
If you go too fast, an alert box will appear saying that they believe you have cheated.

## Test UI Problems
### QuickTypingTest
On QuickTypingTest the prompt text doesn't update when holding space until you let go, but it is updating in the background will still work and count towards your WPM. Letting go of space will cause the UI to jump to the current word.

## Use
### Bookmarks bar
#### No downloads allowed
Expand Down
2 changes: 1 addition & 1 deletion typecheat-bookmark.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
</head>
<body style="font-family: Roboto, Arial, sans-serif;">
<h1>Drag the bookmark below into your bookmarks bar</h1>
<a style="color: black; text-decoration: none; padding: 20px; background-color: lightgray; text-align: center; border-radius: 25px;" href="javascript:/* 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/>. */ var tText,tWords,cWord,tField,url=window.location.href.split(&quot;/&quot;)[2],site=-1,altMode=0;switch(&quot;10fastfingers.com&quot;==url||&quot;www.10fastfingers.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~&quot;),site=0,&quot;text&quot;==window.location.href.split(&quot;/&quot;)[3]&&(altMode=1)):&quot;play.typeracer.com&quot;==url||&quot;typeracer.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~&quot;),site=1):&quot;typingtestnow.com&quot;==url||&quot;www.typingtestnow.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~&quot;),site=2):&quot;www.bing.com&quot;==url||&quot;bing.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~&quot;),site=3):&quot;www.livechatinc.com&quot;!=url&&&quot;livechatinc.com&quot;!=url||(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite LiveChat Inc\n~~~~~~~~~~~~~~~~~~~&quot;),site=4),site){case 0:tText=document.getElementById(&quot;row1&quot;),tWords=[];for(var i=0;i<tText.children.length;i++)tWords.push(tText.children[i].innerText);tField=null,(cWord=0)==altMode?tField=document.getElementById(&quot;inputfield&quot;):1==altMode&&(tField=document.getElementById(&quot;text_typed&quot;)),tField.addEventListener(&quot;keyup&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 1:tText=document.querySelector(&quot;#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td&quot;),tWords=tText.innerText.split(&quot; &quot;),cWord=0,(tField=document.querySelector(&quot;#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 2:tText=document.getElementsByClassName(&quot;sample-text&quot;)[0],tWords=[];for(i=0;i<tText.children.length;i++)for(var j=0;j<tText.children[i].children.length;j++)words.push(tText.children[i].children[j].innerText);cWord=0,(tField=document.getElementById(&quot;practice-input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 3:tText=document.getElementById(&quot;edu_promptText&quot;),tWords=[];var workWord=&quot;&quot;;for(i=0;i<tText.children.length;i++)for(j=0;j<tText.children[i].children.length;j++)&quot;space&quot;==tText.children[i].children[j].className?(tWords.push(workWord),workWord=&quot;&quot;):workWord+=tText.children[i].children[j].innerText;cWord=0,(tField=document.getElementById(&quot;edu_inputText&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 4:tText=document.getElementsByClassName(&quot;test-prompt&quot;)[0],tWords=[];for(i=0;i<tText.children.length;i++)tWords.push(tText.children[i].innerText);cWord=0,(tField=document.getElementById(&quot;test-input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.innerText=tWords[cWord],cWord++,tText.children[tText.children.length-1].innerText!=tWords.slice(-1)&&tWords.push(tText.children[tText.children.length-1].innerText))})}">TypeCheat</a>
<a style="color: black; text-decoration: none; padding: 20px; background-color: lightgray; text-align: center; border-radius: 25px;" href="javascript:/* 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/>. */ var tText,tWords,cWord,tField,workWord,url=window.location.href.split(&quot;/&quot;)[2].replace(&quot;www.&quot;,&quot;&quot;),site=-1,altMode=0;switch(&quot;10fastfingers.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~&quot;),site=0,&quot;text&quot;==window.location.href.split(&quot;/&quot;)[3]&&(altMode=1)):&quot;play.typeracer.com&quot;==url||&quot;typeracer.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~&quot;),site=1):&quot;typingtestnow.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~&quot;),site=2):&quot;bing.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~&quot;),site=3):&quot;livechatinc.com&quot;==url?(console.log(&quot;~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: LiveChat Inc\n~~~~~~~~~~~~~~~~~~~&quot;),site=4):&quot;quicktypingtest.com&quot;==url&&(console.log(&quot; ~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: QuickTypingTest\n ~~~~~~~~~~~~~~~~~~~&quot;),site=5),site){case 0:tText=document.getElementById(&quot;row1&quot;),tWords=[];for(var i=0;i<tText.children.length;i++)tWords.push(tText.children[i].innerText);tField=null,(cWord=0)==altMode?tField=document.getElementById(&quot;inputfield&quot;):1==altMode&&(tField=document.getElementById(&quot;text_typed&quot;)),tField.addEventListener(&quot;keyup&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 1:tText=document.querySelector(&quot;#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td&quot;),tWords=tText.innerText.split(&quot; &quot;),cWord=0,(tField=document.querySelector(&quot;#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 2:tText=document.getElementsByClassName(&quot;sample-text&quot;)[0],tWords=[];for(i=0;i<tText.children.length;i++)for(var j=0;j<tText.children[i].children.length;j++)words.push(tText.children[i].children[j].innerText);cWord=0,(tField=document.getElementById(&quot;practice-input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 3:tText=document.getElementById(&quot;edu_promptText&quot;),tWords=[],workWord=&quot;&quot;;for(i=0;i<tText.children.length;i++)for(j=0;j<tText.children[i].children.length;j++)&quot;space&quot;==tText.children[i].children[j].className?(tWords.push(workWord),workWord=&quot;&quot;):workWord+=tText.children[i].children[j].innerText;cWord=0,(tField=document.getElementById(&quot;edu_inputText&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 4:tText=document.getElementsByClassName(&quot;test-prompt&quot;)[0],tWords=[];for(i=0;i<tText.children.length;i++)tWords.push(tText.children[i].innerText);cWord=0,(tField=document.getElementById(&quot;test-input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.innerText=tWords[cWord],cWord++,tText.children[tText.children.length-1].innerText!=tWords.slice(-1)&&tWords.push(tText.children[tText.children.length-1].innerText))});break;case 5:tText=document.querySelector(&quot;#text-display&quot;),tWords=[],workWord=&quot;&quot;;for(i=0;i<tText.children.length;i++){workWord=&quot;&quot;;for(j=0;j<tText.children[i].children.length;j++)workWord+=tText.children[i].children[j].innerText;tWords.push(workWord)}cWord=0,(tField=document.getElementById(&quot;text-input&quot;)).addEventListener(&quot;keydown&quot;,function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)})}">TypeCheat</a>
</body>
</html>
67 changes: 50 additions & 17 deletions typecheat-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,42 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// Check current site
let url = window.location.href.split("/")[2];
let url = window.location.href.split("/")[2].replace("www.", "");
let site = -1;
let altMode = 0;
if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
if(url == "10fastfingers.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~");
site = 0;
if(window.location.href.split("/")[3] == "text") altMode = 1;
} else if(url == "play.typeracer.com" || url == "typeracer.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~");
site = 1;
} else if(url == "typingtestnow.com" || url == "www.typingtestnow.com") {
} else if(url == "typingtestnow.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~");
site = 2;
} else if(url == "www.bing.com" || url == "bing.com") {
} else if(url == "bing.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~");
site = 3;
} else if(url == "www.livechatinc.com" || url == "livechatinc.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite LiveChat Inc\n~~~~~~~~~~~~~~~~~~~");
} else if(url == "livechatinc.com") {
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: LiveChat Inc\n~~~~~~~~~~~~~~~~~~~");
site = 4;
} else if(url == "quicktypingtest.com") {
console.log(" ~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: QuickTypingTest\n ~~~~~~~~~~~~~~~~~~~");
site = 5;
}

// Variables
let tText, tWords, cWord, tField;
let tText, tWords, cWord, tField, workWord;

// 10FastFingers Cheat Code
// 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);
}
// Interval
// Cheat
cWord = 0;
// Different method for different modes
tField = null;
Expand All @@ -84,12 +87,12 @@ function tenFastCheat() {
document.getElementById("ads-speedtest-view-container").children[0].style = "width: 100%; color: #0F0;";
}

// TypeRacer Cheat Code
// TypeRacer
function typeRacerCheat() {
// Generate wordlist
tText = 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");
tWords = tText.innerText.split(" ");
// Interval
// Cheat
cWord = 0;
tField = document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input");
tField.addEventListener("keydown", function(e) {
Expand All @@ -102,7 +105,7 @@ function typeRacerCheat() {
document.getElementsByClassName("navigation")[0].children[0].style = "width: 100%; color: #0F0;";
}

// TypingTestNow Cheat Code
// TypingTestNow
function typingTestNowCheat() {
// Generate wordlist
tText = document.getElementsByClassName("sample-text")[0];
Expand All @@ -112,7 +115,7 @@ function typingTestNowCheat() {
words.push(tText.children[i].children[j].innerText);
}
}
// Interval
// Cheat
cWord = 0;
tField = document.getElementById("practice-input");
tField.addEventListener("keydown", function(e) {
Expand All @@ -125,7 +128,7 @@ function typingTestNowCheat() {
document.getElementsByClassName("row")[0].children[0].style = "width: 100%; color: #0F0;";
}

// Bing Typing Test Cheat Code
// Bing Typing Test
function bingCheat() {
// Generate wordlist
tText = document.getElementById("edu_promptText");
Expand All @@ -141,7 +144,7 @@ function bingCheat() {
}
}
}
// Interval
// Cheat
cWord = 0;
tField = document.getElementById("edu_inputText");
tField.addEventListener("keydown", function(e) {
Expand All @@ -153,15 +156,15 @@ function bingCheat() {
// Change button colour to show that it has activated
document.getElementById("edu_answer").children[0].children[0].getElementsByTagName("button")[0].style = "color: #0F0;";
}
// LiveChat Inc Cheat Code
// LiveChat Inc
function liveChatCheat() {
// Generate wordlist
tText = document.getElementsByClassName("test-prompt")[0];
tWords = [];
for(let i = 0; i < tText.children.length; i++) {
tWords.push(tText.children[i].innerText);
}
// Interval
// Cheat
cWord = 0;
tField = document.getElementById("test-input");
tField.addEventListener("keydown", function(e) {
Expand All @@ -178,6 +181,32 @@ function liveChatCheat() {
document.getElementsByClassName("metrics")[1].children[1].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;";
}

// Cheat
switch(site) {
// 10FastFingers (Normal)
Expand Down Expand Up @@ -205,4 +234,8 @@ switch(site) {
// Create cheat button
document.getElementsByClassName("metrics")[1].innerHTML += "<button onclick=\"javascript:liveChatCheat();\">Start TypeCheat</button>"
break;
// QuickTypingTest
case 5:
document.getElementById("navbarResponsive").innerHTML = "<button style=\"width: 100%;\" onclick=\"javascript:quickTypingCheat();\">Start TypeCheat</button>" + document.getElementById("navbarResponsive").innerHTML;
break;
}
Loading

0 comments on commit 3597cf5

Please sign in to comment.