Last active
May 5, 2021 12:41
-
-
Save codergautam/7f84dc41b813697b5cb1f923a66a033e to your computer and use it in GitHub Desktop.
very buggy made in 5 min typeracer.com hack
This file contains 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
//copy below code and paste in developer console | |
//known bugs | |
//you need to keep focus and unfocusing the text box for the words to register and move forwars | |
//it will glitch and slow down on commas, but it will move on eventually | |
//at the end, it will start doing character by character | |
//how to change speed: | |
//go to the last line where you see }, 500) | |
//make the lower for higher speed, make it higher for lower speed | |
function getWord() { | |
var list = document.querySelectorAll("[unselectable=on]"); | |
console.log(list.length, list) | |
if (list.length == 4) { | |
return list[1].innerText + list[2].innerText | |
} else if (list.length == 3) { | |
if (list[2].innerText == ".") return list[1].innerText + "."; | |
totalarr = (list[0].innerText + list[1].innerText).split(" ") | |
return totalarr[totalarr.length - 1]; | |
} else if (list.length == 5) { | |
return list[1].innerText + list[2].innerText | |
} else { | |
return list[1].innerText; | |
} | |
} | |
function getTextBox() { | |
if (document.getElementsByClassName("txtInput")[0].disabled) return undefined; | |
return document.getElementsByClassName("txtInput")[0]; | |
} | |
setInterval(() => { | |
textbox = getTextBox(); | |
if (textbox) { | |
word = getWord() | |
textbox.value = word | |
textbox.value = textbox.value + " " | |
} | |
}, 500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment