Created
August 27, 2015 18:27
-
-
Save rlemon/b74d9555405c3772dede to your computer and use it in GitHub Desktop.
input fuker
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
[...document.querySelectorAll('input[type="text"],textarea')].forEach(el=>{ | |
let fn = () => { | |
el.addEventListener('keyup', () => { | |
( Math.random()<.9 ) && ( return ); | |
this.selectionEnd = this.selectionStart = Math.random()*this.value.length|0; | |
}; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment