Skip to content

Instantly share code, notes, and snippets.

@ccb9921
Created Oct 30, 2020
Embed
What would you like to do?
Cookie Clicker Autoclicker
/**
* 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