Created
January 1, 2018 15:07
-
-
Save aashutoshrathi/d14be6f98600beda531bf33c2eee7128 to your computer and use it in GitHub Desktop.
Hack Typeracer without it even detecting it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wait(ms) { | |
var d = new Date(); | |
var d2 = null; | |
do { d2 = new Date(); } | |
while(d2-d < ms); | |
} | |
function hackIt() { | |
speed = 100; // in wpm | |
inp = document.getElementsByTagName('input'); | |
x = document.getElementsByTagName('span'); | |
text = ""; | |
init = 0; | |
end = 0; | |
for (var i = 0; i < x.length; i++) { | |
if(x[i].className === "lblUsername") | |
init = i; | |
if(x[i].className === "gwt-InlineLabel") { | |
end = i; | |
} | |
} | |
for (var i = init; i < end; i++) { | |
text += x[i].innerText; | |
} | |
words = text.split(); | |
timeDelay = 60000/speed; // for near to <100wpm for safe use, otherwise a warning will popup. | |
for (var i = 0; i < words.length; i++) { | |
inp[0].value = words[i] + " "; | |
wait(timeDelay); | |
} | |
} | |
hackIt(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment