From 493396325b6d5a0fff6c89f1f730f0a5fcf7e86d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 20 Apr 2018 07:38:59 +0200 Subject: [PATCH] Use hooks instead of own intervals Signed-off-by: Knut Ahlers --- autocookieclicker.user.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autocookieclicker.user.js b/autocookieclicker.user.js index bc43642..454db83 100644 --- a/autocookieclicker.user.js +++ b/autocookieclicker.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Automate CookieClicker // @namespace https://luzifer.io/ -// @version 0.15.1 +// @version 0.16.0 // @description Automate everything! // @author Knut Ahlers // @source https://github.com/Luzifer/automate-cookie-clicker @@ -97,10 +97,8 @@ function installHelper() { let version = GM_info.script.version; note('Version ' + version + ' loaded.'); - window.controlAutoClicker = window.setInterval(controlAutoClicker, 1000); - - // Enable automatic purchasing of upgrades / elements - window.autoPurchase = window.setInterval(executeAutoActions, 500); + Game.customChecks.push(controlAutoClicker); + Game.customLogic.push(executeAutoActions); } function manageDragon() {