mirror of
https://github.com/Luzifer/automate-cookie-clicker.git
synced 2024-12-23 10:41:17 +00:00
Move const to top level variable
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9b6752a37e
commit
b3b713e0de
1 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Automate CookieClicker
|
// @name Automate CookieClicker
|
||||||
// @namespace https://luzifer.io/
|
// @namespace https://luzifer.io/
|
||||||
// @version 0.6.1
|
// @version 0.6.2
|
||||||
// @description Automate everything!
|
// @description Automate everything!
|
||||||
// @author Knut Ahlers <knut@ahlers.me>
|
// @author Knut Ahlers <knut@ahlers.me>
|
||||||
// @match http://orteil.dashnet.org/cookieclicker/
|
// @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");');
|
GM_addStyle('@import url("https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css");');
|
||||||
|
|
||||||
|
var purchaseSteps = 50;
|
||||||
|
|
||||||
function autoClick() {
|
function autoClick() {
|
||||||
$('#bigCookie').click();
|
$('#bigCookie').click();
|
||||||
}
|
}
|
||||||
|
@ -67,7 +69,7 @@ function getMaxBuy() {
|
||||||
topPurchaseCount = parseInt(topPurchaseTextCount);
|
topPurchaseCount = parseInt(topPurchaseTextCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.max(Math.ceil((topPurchaseCount + 1) / 50), 1) * 50;
|
return Math.max(Math.ceil((topPurchaseCount + 1) / purchaseSteps), 1) * purchaseSteps;
|
||||||
}
|
}
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
Loading…
Reference in a new issue