From 870686032d63737814d325a2e4c4542020ef270c Mon Sep 17 00:00:00 2001 From: Liwanyi Date: Thu, 22 Dec 2022 10:43:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- misc/Christmas_Town_Helper_2.3.3_mobile.js | 104 +++++++++++---------- src/ts/class/ZhongIcon.ts | 2 + src/ts/class/provider/Provider.ts | 11 ++- src/ts/class/utils/Timer.ts | 3 +- 4 files changed, 66 insertions(+), 54 deletions(-) diff --git a/misc/Christmas_Town_Helper_2.3.3_mobile.js b/misc/Christmas_Town_Helper_2.3.3_mobile.js index f1b67b1..ddd0fb0 100644 --- a/misc/Christmas_Town_Helper_2.3.3_mobile.js +++ b/misc/Christmas_Town_Helper_2.3.3_mobile.js @@ -26,7 +26,7 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml //Thanks to Ahab and Helcostr for the list of words and all the help. let listofWords = ["elf", "eve", "fir", "ham", "icy", "ivy", "joy", "pie", "toy", "gift", "gold", "list", "love", "nice", "sled", "star", "wish", "wrap", "xmas", "yule", "angel", "bells", "cider", "elves", "goose", "holly", "jesus", "merry", "myrrh", "party", "skate", "visit", "candle", "creche", "cookie", "eggnog", "family", "frosty", "icicle", "joyful", "manger", "season", "spirit", "tinsel", "turkey", "unwrap", "wonder", "winter", "wreath", "charity", "chimney", "festive", "holiday", "krampus", "mittens", "naughty", "package", "pageant", "rejoice", "rudolph", "scrooge", "snowman", "sweater", "tidings", "firewood", "nativity", "reindeer", "shopping", "snowball", "stocking", "toboggan", "trimming", "vacation", "wise men", "workshop", "yuletide", "chestnuts", "christmas", "fruitcake", "greetings", "mince pie", "mistletoe", "ornaments", "snowflake", "tradition", "candy cane", "decoration", "ice skates", "jack frost", "north pole", "nutcracker", "saint nick", "yule log", "card", "jolly", "hope", "scarf", "candy", "sleigh", "parade", "snowy", "wassail", "blizzard", "noel", "partridge", "give", "carols", "tree", "fireplace", "socks", "lights", "kings", "goodwill", "sugarplum", "bonus", "coal", "snow", "happy", "presents", "pinecone"]; let hideDrn = true; - let settings = {"count": 0, "spawn": 0, "speed": 0}; + let settings = { "count": 0, "spawn": 0, "speed": 0 }; let lastSoundChirp; let mobile = false; initiate(); @@ -225,7 +225,7 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml let input = document.querySelector("div[class^='game'] div[class^='board'] input"); if (input) { input.value = target.getAttribute("hardy");//the answer that has to be typed - let event = new Event('input', {bubbles: true}); + let event = new Event('input', { bubbles: true }); let tracker = input._valueTracker; if (tracker) { tracker.setValue(''); @@ -410,12 +410,12 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml if (length > 0) { let newArray = []; for (const element of array) { - newArray.push(`

${element[0]} @ ${element[1]}, ${element[2]} 

`); + newArray.push(`

${ element[0] } @ ${ element[1] }, ${ element[2] } 

`); } if (selector == "hardyNearbyItems") { - document.querySelector("." + selector).innerHTML = `
${newArray.join("")}
`; + document.querySelector("." + selector).innerHTML = `
${ newArray.join("") }
`; } else { - document.querySelector("." + selector).innerHTML = `
${newArray.join("")}
`; + document.querySelector("." + selector).innerHTML = `
${ newArray.join("") }
`; } } else { if (selector == "hardyNearbyItems") { @@ -477,7 +477,7 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml if (wordSolution === 'whereiscrimes2.0') { updateGame(''); } else { - updateGame(``); + updateGame(``); } } @@ -548,7 +548,7 @@ let func = function (GM_addStyle, unsafeWindow, GM_getValue, GM_setValue, GM_xml } else if (e.target.id == "hardyctHelperdelete") { document.querySelector(".hardyCTtextBox").innerHTML = '

Are you sure you want to delete the finds data?

'; } else if (e.target.id == "hardyCTConfirmDelete") { - let obj = {"items": {}}; + let obj = { "items": {} }; localStorage.setItem("ctHelperFound", JSON.stringify(obj)); document.querySelector(".hardyCTtextBox").innerHTML = '