Created
October 30, 2020 19:59
-
-
Save ccb9921/56e05df53585f16a02ba5cd0d469e82f to your computer and use it in GitHub Desktop.
Cookie Clicker Autoclicker
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
/** | |
* Auto Cookie Clicker | |
* Auto click cookies and golden cookies in the Cookie Clicker | |
* game found here: http://orteil.dashnet.org/cookieclicker/ | |
*/ | |
/** | |
* How to in Chrome: | |
* Open the browers and navigate to http://orteil.dashnet.org/cookieclicker/ | |
* then pressCTRL + SHIFT + J to open the developer console. Copy and paste the | |
* code between the "Auto Clicker" tags and press enter and the auto clicker will begin clicking. To stop | |
* the auto clicker, simply close your browers tab or refresh the page. | |
*/ | |
/* ******************** Auto Clicker ******************** */ | |
function clickId(id) { | |
var element = document.getElementById(id); | |
if(element !== undefined) { | |
doEvent(element, "click"); | |
} | |
window.setTimeout(clickId, 25, id); | |
} | |
function doEvent(element, type) { | |
trigger = document.createEvent('HTMLEvents'); | |
trigger.initEvent(type, true, true); | |
element.dispatchEvent(trigger); | |
} | |
window.setTimeout(clickId, 25, "bigCookie"); | |
window.setTimeout(clickId, 25, "goldenCookie"); | |
/* ****************** End Auto Clicker ****************** */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment