Last active
March 18, 2022 08:57
-
-
Save lucascompython/a3bad22ea63a4b6169c6af03071b48aa to your computer and use it in GitHub Desktop.
This is a very simple typeracer-cheat
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
/* ==== Typeracer Cheat ==== */ | |
//Paste this script into the developer console right before the race start | |
//Now you can press any key and it will enter the correct one | |
var arrSpan = document.querySelectorAll('[unselectable="on"]'); | |
var fullSentence = ''; | |
arrSpan.forEach(function (item) { | |
fullSentence += item.innerHTML; | |
}); | |
var index = 0; | |
document.getElementsByClassName("txtInput")[0].addEventListener("keypress", function (e) { | |
e.preventDefault(); | |
this.value += fullSentence[index++]; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment