Skip to content

Instantly share code, notes, and snippets.

@neet
Created August 15, 2017 04:59
Show Gist options
  • Save neet/f681df587eb1512e0cdb8e3c284cc10e to your computer and use it in GitHub Desktop.
Save neet/f681df587eb1512e0cdb8e3c284cc10e to your computer and use it in GitHub Desktop.
yoroshikuonegaishimaaaasu.com killer
let el = document.getElementsByClassName("practice-keyboard__enter")[0];
let downEvent = document.createEvent("KeyboardEvent");
let upEvent = document.createEvent("KeyboardEvent");
downEvent.initKeyEvent("keydown", true, true, null, 0, 0, 0, 0, 13, 13);
upEvent.initKeyEvent("keyup", true, true, null, 0, 0, 0, 0, 13, 13);
let count = 0;
while (true) {
el.dispatchEvent(downEvent);
el.dispatchEvent(upEvent);
count++;
console.log(count);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment