Window.eval()? Var?
This commit is contained in:
20
README.md
20
README.md
@@ -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() {
|
'use strict';
|
||||||
var 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);
|
||||||
}).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() {
|
'use strict';
|
||||||
var 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);
|
||||||
}).toString() + ")()";
|
|
||||||
|
|
||||||
window.eval(code);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Bugs and suggestions
|
# Bugs and suggestions
|
||||||
|
|||||||
Reference in New Issue
Block a user