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

Commit f7cc5bf

Browse files
Added support for LiveChat Inc typing test.
1 parent ac1515b commit f7cc5bf

File tree

6 files changed

+64
-4
lines changed

6 files changed

+64
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ As of now, the sites that work are:
77
- [TypeRacer](https://play.typeracer.com/)
88
- [TypingTestNow](https://typingtestnow.com/)
99
- [Bing Typing Test](https://www.bing.com/search?q=typing+test)
10+
- [LiveChat Inc](https://www.livechatinc.com/typing-speed-test)
1011

1112
I am planning to add support for more.
1213

@@ -48,6 +49,7 @@ If you go too fast, an alert box will appear saying that they believe you have c
4849
On **10FastFingers**, the button appears just **below** the text field.
4950
On **TypeRacer**, the button appears **in the navbar** above the "Blog, Forum, Pit Stop, About" buttons.
5051
On **TypingTestNow**, the button appears at the **top of the page** just under the navbar.
51-
On **Bing Typing Test**, the button appears in the typing test item **to the right of** the "Typing test" heading.
52+
On **Bing Typing Test**, the button appears in the typing test item **to the right of** the "Typing test" heading.
53+
On **LiveChat Inc**, the button appears in the header **just below the countdown timer**.
5254

5355
**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.**

typecheat-bookmark.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
</head>
2424
<body style="font-family: Roboto, Arial, sans-serif;">
2525
<h1>Drag the bookmark below into your bookmarks bar</h1>
26-
<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),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++)})}">TypeCheat</a>
26+
<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>
2727
</body>
2828
</html>

typecheat-button.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ if(url == "10fastfingers.com" || url == "www.10fastfingers.com") {
4949
} else if(url == "www.bing.com" || url == "bing.com") {
5050
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite: Bing Test\n~~~~~~~~~~~~~~~~~~~");
5151
site = 3;
52+
} else if(url == "www.livechatinc.com" || url == "livechatinc.com") {
53+
console.log("~~~~~~~~~~~~~~~~~~~\n TypeCheat Active! \nSite LiveChat Inc\n~~~~~~~~~~~~~~~~~~~");
54+
site = 4;
5255
}
5356

5457
// Variables
@@ -150,6 +153,30 @@ function bingCheat() {
150153
// Change button colour to show that it has activated
151154
document.getElementById("edu_answer").children[0].children[0].getElementsByTagName("button")[0].style = "color: #0F0;";
152155
}
156+
// LiveChat Inc Cheat Code
157+
function liveChatCheat() {
158+
// Generate wordlist
159+
tText = document.getElementsByClassName("test-prompt")[0];
160+
tWords = [];
161+
for(let i = 0; i < tText.children.length; i++) {
162+
tWords.push(tText.children[i].innerText);
163+
}
164+
// Interval
165+
cWord = 0;
166+
tField = document.getElementById("test-input");
167+
tField.addEventListener("keydown", function(e) {
168+
if(e.keyCode == 32) {
169+
tField.innerText = tWords[cWord];
170+
cWord++;
171+
// The wordlist constantly updates
172+
if(tText.children[tText.children.length-1].innerText != tWords.slice(-1)) {
173+
tWords.push(tText.children[tText.children.length-1].innerText);
174+
}
175+
}
176+
});
177+
// Change button colour to show that it has activated
178+
document.getElementsByClassName("metrics")[1].children[1].style = "color: #0F0;";
179+
}
153180

154181
// Cheat
155182
switch(site) {
@@ -173,4 +200,9 @@ switch(site) {
173200
// Create cheat button
174201
document.getElementById("edu_answer").children[0].children[0].innerHTML += "<button onclick=\"javascript:bingCheat();\">Start TypeCheat</button>";
175202
break;
203+
// LiveCheat Inc
204+
case 4:
205+
// Create cheat button
206+
document.getElementsByClassName("metrics")[1].innerHTML += "<button onclick=\"javascript:liveChatCheat();\">Start TypeCheat</button>"
207+
break;
176208
}

typecheat-button.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)