diff --git a/game/js/Cfunction.js b/game/js/Cfunction.js index 5d2631b..953ec7c 100644 --- a/game/js/Cfunction.js +++ b/game/js/Cfunction.js @@ -2765,7 +2765,6 @@ var $User = (function () { SetBlock($("dSurface"), $("dZombieFail")); oSym.Stop(); }), - (PrepareGrowPlants = function (a) { var b = function () { PlayAudio("readysetplant"); diff --git a/game/js/Custom.js b/game/js/Custom.js index 2459441..d927c01 100644 --- a/game/js/Custom.js +++ b/game/js/Custom.js @@ -1,27 +1,29 @@ function waitForElm(selector) { - return new Promise(resolve => { - if (document.querySelector(selector)) { - return resolve(document.querySelector(selector)); - } + return new Promise((resolve) => { + if (document.querySelector(selector)) { + return resolve(document.querySelector(selector)); + } - const observer = new MutationObserver(mutations => { - if (document.querySelector(selector)) { - observer.disconnect(); - resolve(document.querySelector(selector)); - } - }); + const observer = new MutationObserver((mutations) => { + if (document.querySelector(selector)) { + observer.disconnect(); + resolve(document.querySelector(selector)); + } + }); - // If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336 - observer.observe(document.body, { - childList: true, - subtree: true - }); - }); + // If you get "parameter 1 is not of type 'Node'" error, see https://stackoverflow.com/a/77855838/492336 + observer.observe(document.body, { + childList: true, + subtree: true, + }); + }); } // wait for #commit to exist -waitForElm('#commit').then(elm => { +waitForElm("#commit").then((elm) => { // set the innertext to that of the contents of ../v.txt - fetch('../v.txt').then(response => response.text()).then(text => elm.innerText = text); + fetch("../v.txt") + .then((response) => response.text()) + .then((text) => (elm.innerText = text)); }); const saveWhitelist = [