diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 85fc9c0a..bf531737 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -26,7 +26,11 @@ const getItemListsController: RequestHandler = (req, response) => { res.miscitems = []; for (const [uniqueName, item] of Object.entries(ExportWeapons)) { if (item.totalDamage !== 0) { - if (item.productCategory == "LongGuns" || item.productCategory == "Pistols" || item.productCategory == "Melee") { + if ( + item.productCategory == "LongGuns" || + item.productCategory == "Pistols" || + item.productCategory == "Melee" + ) { res[item.productCategory].push({ uniqueName, name: getString(item.name, lang) diff --git a/static/webui/script.js b/static/webui/script.js index 72ea5c60..fa341ce4 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -553,7 +553,9 @@ $("input[list]").on("input", function () { function doAcquireWeapon(category) { const uniqueName = getKey(document.getElementById("acquire-type-" + category)); if (!uniqueName) { - $("#acquire-type-" + category).addClass("is-invalid").focus(); + $("#acquire-type-" + category) + .addClass("is-invalid") + .focus(); return; } revalidateAuthz(() => { @@ -644,11 +646,13 @@ function maxRankAllWarframes() { function addMissingWeapons() { const requests = []; - document.querySelectorAll("#datalist-LongGuns option, #datalist-Pistols option, #datalist-Melee option").forEach(elm => { - if (!document.querySelector("#weapon-list [data-item-type='" + elm.getAttribute("data-key") + "']")) { - requests.push({ type: "Weapon", internalName: elm.getAttribute("data-key") }); - } - }); + document + .querySelectorAll("#datalist-LongGuns option, #datalist-Pistols option, #datalist-Melee option") + .forEach(elm => { + if (!document.querySelector("#weapon-list [data-item-type='" + elm.getAttribute("data-key") + "']")) { + requests.push({ type: "Weapon", internalName: elm.getAttribute("data-key") }); + } + }); if ( requests.length != 0 && window.confirm("Are you sure you want to add " + requests.length + " items to your account?")