Created
June 25, 2016 00:34
-
-
Save konstantinos-tsatsarounos/8532ecc8e9398c84f21be86489293efd to your computer and use it in GitHub Desktop.
http://typing-speed-test.aoeu.eu/ cheat script
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 pressSpace(target, type) { | |
| var press = new KeyboardEvent(type, {"keyCode": 32}); | |
| if(type == 'keyup'){ target.value += ' ';} | |
| target.dispatchEvent(press); | |
| } | |
| function type(){ | |
| var text = document.getElementById('words'); | |
| var currentword = document.getElementById('currentword'); | |
| var input = document.getElementById('input'); | |
| if(input.value.indexOf('currentword.innerText') == -1){ | |
| input.value = currentword.innerText; | |
| pressSpace(input, 'keydown'); | |
| setTimeout( function(){ | |
| pressSpace(input, 'keyup'); | |
| }, 200); | |
| } | |
| } | |
| // document.getElementById('input').addEventListener('keyup', function(evt){ console.log(evt.keyCode); } ); | |
| var handler = setInterval(type, 200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment