Merge pull request #536 from Aktanusa/jscolor

Hot fix for jscolor
This commit is contained in:
DanielNoord
2021-01-30 01:17:33 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -5507,7 +5507,6 @@ CM.Footer.AddJscolor = function() {
CM.Footer.Jscolor.type = 'text/javascript'; CM.Footer.Jscolor.type = 'text/javascript';
CM.Footer.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); CM.Footer.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js');
document.head.appendChild(CM.Footer.Jscolor); document.head.appendChild(CM.Footer.Jscolor);
jscolor.init();
} }
/** /**
@@ -5519,6 +5518,7 @@ if (!CM.isRunning) {
CM.Footer.AddJscolor(); CM.Footer.AddJscolor();
var delay = setInterval(function() { var delay = setInterval(function() {
if (typeof jscolor !== 'undefined') { if (typeof jscolor !== 'undefined') {
jscolor.init();
Game.registerMod('CookieMonster', CM); Game.registerMod('CookieMonster', CM);
clearInterval(delay); clearInterval(delay);
} }

View File

@@ -56,7 +56,6 @@ CM.Footer.AddJscolor = function() {
CM.Footer.Jscolor.type = 'text/javascript'; CM.Footer.Jscolor.type = 'text/javascript';
CM.Footer.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); CM.Footer.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js');
document.head.appendChild(CM.Footer.Jscolor); document.head.appendChild(CM.Footer.Jscolor);
jscolor.init();
} }
/** /**
@@ -68,6 +67,7 @@ if (!CM.isRunning) {
CM.Footer.AddJscolor(); CM.Footer.AddJscolor();
var delay = setInterval(function() { var delay = setInterval(function() {
if (typeof jscolor !== 'undefined') { if (typeof jscolor !== 'undefined') {
jscolor.init();
Game.registerMod('CookieMonster', CM); Game.registerMod('CookieMonster', CM);
clearInterval(delay); clearInterval(delay);
} }