From a22ec2fee8de35e6f064228d0d7c8298aebb86db Mon Sep 17 00:00:00 2001 From: Adam Thompson-Sharpe Date: Tue, 29 Jun 2021 14:36:16 -0400 Subject: [PATCH] Fix TypeRacer --- typecheat-bookmark.html | 2 +- typecheat-button.js | 6 +++--- typecheat-button.min.js | 2 +- typecheat.js | 4 ++-- typecheat.min.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/typecheat-bookmark.html b/typecheat-bookmark.html index f1ddb4c..84ba4aa 100644 --- a/typecheat-bookmark.html +++ b/typecheat-bookmark.html @@ -23,6 +23,6 @@

Drag the bookmark below into your bookmarks bar

- TypeCheat + TypeCheat diff --git a/typecheat-button.js b/typecheat-button.js index 7a0dcdc..c2b7952 100644 --- a/typecheat-button.js +++ b/typecheat-button.js @@ -89,11 +89,11 @@ function tenFastCheat() { // 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'); + tText = document.querySelector('.inputPanel').firstChild.firstChild.firstChild.firstChild.firstChild.firstChild; tWords = tText.innerText.split(' '); // 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 = document.querySelector('.txtInput'); tField.addEventListener('keydown', function(e) { if(e.keyCode == 32) { tField.value = tWords[cWord]; @@ -258,7 +258,7 @@ switch(site) { // TypeRacer case 1: // Create cheat button - document.getElementsByClassName('navigation')[0].innerHTML = '' + document.getElementsByClassName('navigation')[0].innerHTML; + document.getElementsByClassName('navigation')[0].innerHTML = '' + document.getElementsByClassName('navigation')[0].innerHTML; break; // TypingTestNow case 2: diff --git a/typecheat-button.min.js b/typecheat-button.min.js index de3aff6..2314743 100644 --- a/typecheat-button.min.js +++ b/typecheat-button.min.js @@ -15,4 +15,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -let tText,tWords,cWord,tField,workWord,url=window.location.href.split("/")[2].replace("www.",""),site=-1,altMode=0;switch(url){case"10fastfingers.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~"),site=0,"text"==window.location.href.split("/")[3]&&(altMode=1);break;case"typeracer.com":case"play.typeracer.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~"),site=1;break;case"typingtestnow.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~"),site=2;break;case"bing.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~"),site=3;break;case"livechat.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: LiveChat\n~~~~~~~~~~~~~~~~~~~"),site=4;break;case"quicktypingtest.com":console.log(" ~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: QuickTypingTest\n ~~~~~~~~~~~~~~~~~~~"),site=5;break;case"typing-speed-test.aoeu.eu":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: AOEU Test\n~~~~~~~~~~~~~~~~~~~"),site=6;break;case"indiatyping.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: India Typing\n~~~~~~~~~~~~~~~~~~~"),site=7}function tenFastCheat(){tText=document.getElementById("row1"),tWords=[];for(let e=0;e 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(" "),cWord=0,(tField=document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input")).addEventListener("keydown",function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)}),document.getElementsByClassName("navigation")[0].children[0].style="width: 100%; color: #0F0;"}function typingTestNowCheat(){tText=document.getElementsByClassName("sample-text")[0],tWords=[];for(let e=0;e table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(1) > td > table > tbody > tr:nth-child(1) > td'); + tText = document.querySelector('.inputPanel').firstChild.firstChild.firstChild.firstChild.firstChild.firstChild; tWords = tText.innerText.split(' '); // 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 = document.querySelector('.txtInput'); tField.addEventListener('keydown', function(e) { if(e.keyCode == 32) { tField.value = tWords[cWord]; diff --git a/typecheat.min.js b/typecheat.min.js index c96fcb2..2d249ba 100644 --- a/typecheat.min.js +++ b/typecheat.min.js @@ -15,4 +15,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -let tText,tWords,cWord,tField,workWord,url=window.location.href.split("/")[2].replace("www.",""),site=-1,altMode=0;switch(url){case"10fastfingers.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: 10FastFingers\n~~~~~~~~~~~~~~~~~~~"),site=0,"text"==window.location.href.split("/")[3]&&(altMode=1);break;case"typeracer.com":case"play.typeracer.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypeRacer\n~~~~~~~~~~~~~~~~~~~"),site=1;break;case"typingtestnow.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: TypingTestNow\n~~~~~~~~~~~~~~~~~~~"),site=2;break;case"bing.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~"),site=3;break;case"livechat.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: LiveChat\n~~~~~~~~~~~~~~~~~~~"),site=4;break;case"quicktypingtest.com":console.log(" ~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: QuickTypingTest\n ~~~~~~~~~~~~~~~~~~~"),site=5;break;case"typing-speed-test.aoeu.eu":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: AOEU Test\n~~~~~~~~~~~~~~~~~~~"),site=6;break;case"indiatyping.com":console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: India Typing\n~~~~~~~~~~~~~~~~~~~"),site=7}switch(site){case 0:tText=document.getElementById("row1"),tWords=[];for(let e=0;e 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(" "),cWord=0,(tField=document.querySelector("#gwt-uid-15 > table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > input")).addEventListener("keydown",function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 2:tText=document.getElementsByClassName("sample-text")[0],tWords=[];for(let e=0;e