Merge pull request #536 from Aktanusa/jscolor

Hot fix for jscolor
This commit is contained in:
DanielNoord authored and GitHub committed 2021-01-30 01:17:33 +01:00
commit 6ed19f23e6
2 files changed
+2 -2

No files matched your search

+1 -1
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);
} }
+1 -1
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);
} }