Simpler readme Userscript code in README

Simpler readme Userscript code
This commit is contained in:
DanielNoord
2020-11-28 16:49:04 +01:00
committed by GitHub

View File

@@ -82,16 +82,14 @@ If you'd rather use the addon as a script via per example *Greasemonkey* or *Tam
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
var code = "(" + (function() { (function() {
var checkReady = setInterval(function() { const 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);
}).toString() + ")()"; })();
window.eval(code);
``` ```
If you are using the beta, use this instead: If you are using the beta, use this instead:
@@ -105,16 +103,14 @@ If you are using the beta, use this instead:
// @grant none // @grant none
// ==/UserScript== // ==/UserScript==
var code = "(" + (function() { (function() {
var checkReady = setInterval(function() { const 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);
}).toString() + ")()"; })();
window.eval(code);
``` ```
# Bugs and suggestions # Bugs and suggestions