Last active
August 15, 2021 15:39
-
-
Save rayriffy/34ff43ee0f1a18255692770f5ab3e024 to your computer and use it in GitHub Desktop.
popcat.click clicker
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
// popcat auto-clicker | |
// by rayriffy | |
// drop this into DevTools console | |
// to run: | |
// let agent = clicker() | |
// | |
// to stop: | |
// agent.stop() | |
let clicker = (interval) => { | |
const intervalId = setInterval(() => { | |
document.dispatchEvent( | |
new KeyboardEvent('keydown', { key: 'a' }), | |
interval | |
) | |
}) | |
const stop = () => clearInterval(intervalId) | |
return { | |
intervalId, | |
stop, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment