scoping of variables.

This commit is contained in:
steven nguyen
2020-07-05 10:58:17 -05:00
committed by GitHub
parent 706fb7231e
commit dc6d643f7d

View File

@@ -82,14 +82,14 @@ If you'd rather use the addon as a script via per example *Greasemonkey* or *Tam
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
'use strict'; (function() {
const checkReady = setInterval(function() {
let checkReady = setInterval(function() { if (typeof Game.ready !== 'undefined' && Game.ready) {
if (typeof Game.ready !== 'undefined' && Game.ready) { Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js');
Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js'); clearInterval(checkReady);
clearInterval(checkReady); }
} }, 1000);
}, 1000); })();
``` ```
If you are using the beta, use this instead: If you are using the beta, use this instead:
@@ -103,14 +103,14 @@ If you are using the beta, use this instead:
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
'use strict'; (function() {
const checkReady = setInterval(function() {
let checkReady = setInterval(function() { if (typeof Game.ready !== 'undefined' && Game.ready) {
if (typeof Game.ready !== 'undefined' && Game.ready) { Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js');
Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js'); clearInterval(checkReady);
clearInterval(checkReady); }
} }, 1000);
}, 1000); })();
``` ```
# Bugs and suggestions # Bugs and suggestions