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

Commit

Permalink
Fix TypeRacer
Browse files Browse the repository at this point in the history
  • Loading branch information
MysteryBlokHed committed Jun 29, 2021
1 parent 7e4fdc6 commit a22ec2f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
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: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<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,tField=null,0==altMode?tField=document.getElementById('inputfield'):1==altMode&&(tField=document.getElementById('text_typed')),tField.addEventListener('keyup',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 1: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(' '),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<tText.children.length;e++)for(let t=0;t<tText.children[e].children.length;t++)tWords.push(tText.children[e].children[t].innerText);cWord=0,(tField=document.getElementById('practice-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 3:tText=document.getElementById('edu_promptText'),tWords=[],workWord='';for(let e=0;e<tText.children.length;e++)for(let t=0;t<tText.children[e].children.length;t++)'space'==tText.children[e].children[t].className?(tWords.push(workWord),workWord=''):workWord+=tText.children[e].children[t].innerText;cWord=0,(tField=document.getElementById('edu_inputText')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 4:tText=document.getElementsByClassName('tst-input-wrapper')[1],tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('test-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.innerText=tWords[cWord],cWord++,tText.lastChild.innerText!=tWords.slice(-1)&&tWords.push(tText.lastChild.innerText))});break;case 5:tText=document.querySelector('#text-display'),tWords=[],workWord='';for(let e=0;e<tText.children.length;e++){workWord='';for(let t=0;t<tText.children[e].children.length;t++)workWord+=tText.children[e].children[t].innerText;tWords.push(workWord)}cWord=0,(tField=document.getElementById('text-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 6:tText=document.getElementById('words'),tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('input')).addEventListener('keyup',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 7:tText=document.getElementById('blockrandom').contentDocument.getElementById('unicodeText'),tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('blockrandom').contentDocument.getElementById('toType')).addEventListener('keyup',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)})}">TypeCheat</a>
<a style="color: black; text-decoration: none; padding: 20px; background-color: lightgray; text-align: center; border-radius: 25px;" href="javascript: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<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,tField=null,0==altMode?tField=document.getElementById('inputfield'):1==altMode&&(tField=document.getElementById('text_typed')),tField.addEventListener('keyup',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 1:tText=document.querySelector('.inputPanel').firstChild.firstChild.firstChild.firstChild.firstChild.firstChild,tWords=tText.innerText.split(' '),cWord=0,(tField=document.querySelector('.txtInput')).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<tText.children.length;e++)for(let t=0;t<tText.children[e].children.length;t++)tWords.push(tText.children[e].children[t].innerText);cWord=0,(tField=document.getElementById('practice-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 3:tText=document.getElementById('edu_promptText'),tWords=[],workWord='';for(let e=0;e<tText.children.length;e++)for(let t=0;t<tText.children[e].children.length;t++)'space'==tText.children[e].children[t].className?(tWords.push(workWord),workWord=''):workWord+=tText.children[e].children[t].innerText;cWord=0,(tField=document.getElementById('edu_inputText')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 4:tText=document.getElementsByClassName('tst-input-wrapper')[1],tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('test-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.innerText=tWords[cWord],cWord++,tText.lastChild.innerText!=tWords.slice(-1)&&tWords.push(tText.lastChild.innerText))});break;case 5:tText=document.querySelector('#text-display'),tWords=[],workWord='';for(let e=0;e<tText.children.length;e++){workWord='';for(let t=0;t<tText.children[e].children.length;t++)workWord+=tText.children[e].children[t].innerText;tWords.push(workWord)}cWord=0,(tField=document.getElementById('text-input')).addEventListener('keydown',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)});break;case 6:tText=document.getElementById('words'),tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('input')).addEventListener('keyup',function(e){32==e.keyCode&&(tField.value=tWords[cWord],cWord++)});break;case 7:tText=document.getElementById('blockrandom').contentDocument.getElementById('unicodeText'),tWords=[];for(let e=0;e<tText.children.length;e++)tWords.push(tText.children[e].innerText);cWord=0,(tField=document.getElementById('blockrandom').contentDocument.getElementById('toType')).addEventListener('keyup',function(e){32==e.keyCode&&(tField.value+=tWords[cWord],cWord++)})}">TypeCheat</a>
</body>
</html>
6 changes: 3 additions & 3 deletions typecheat-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -258,7 +258,7 @@ switch(site) {
// TypeRacer
case 1:
// Create cheat button
document.getElementsByClassName('navigation')[0].innerHTML = '<button style="width: 100%;" onclick="typeRacerCheat();">Start TypeCheat</button>' + document.getElementsByClassName('navigation')[0].innerHTML;
document.getElementsByClassName('navigation')[0].innerHTML = '<button style="width: 50%;" onclick="typeRacerCheat();">Start TypeCheat</button>' + document.getElementsByClassName('navigation')[0].innerHTML;
break;
// TypingTestNow
case 2:
Expand Down
Loading

0 comments on commit a22ec2f

Please sign in to comment.