From b3b713e0de4ec9779ce31db63a9998bd82e72a1c Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 11 Apr 2018 22:41:32 +0200 Subject: [PATCH] Move const to top level variable Signed-off-by: Knut Ahlers --- autocookieclicker.user.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autocookieclicker.user.js b/autocookieclicker.user.js index 8ebbc24..d803e67 100644 --- a/autocookieclicker.user.js +++ b/autocookieclicker.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Automate CookieClicker // @namespace https://luzifer.io/ -// @version 0.6.1 +// @version 0.6.2 // @description Automate everything! // @author Knut Ahlers // @match http://orteil.dashnet.org/cookieclicker/ @@ -14,6 +14,8 @@ GM_addStyle('@import url("https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css");'); +var purchaseSteps = 50; + function autoClick() { $('#bigCookie').click(); } @@ -67,7 +69,7 @@ function getMaxBuy() { topPurchaseCount = parseInt(topPurchaseTextCount); } - return Math.max(Math.ceil((topPurchaseCount + 1) / 50), 1) * 50; + return Math.max(Math.ceil((topPurchaseCount + 1) / purchaseSteps), 1) * purchaseSteps; } (function() {