From 7a1e621e4480b894b3f54894c1bee871dfa1d9ff Mon Sep 17 00:00:00 2001 From: Kobe De Peuter Date: Wed, 18 Dec 2024 09:27:45 +0100 Subject: [PATCH] Code cleanup. --- .../scripts/features/cooldown-end-times/ttCooldownEndTimes.js | 4 +--- .../opened-supply-pack-value/ttOpenedSupplyPackValue.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extension/scripts/features/cooldown-end-times/ttCooldownEndTimes.js b/extension/scripts/features/cooldown-end-times/ttCooldownEndTimes.js index 7d10ebc02..a8c522bde 100644 --- a/extension/scripts/features/cooldown-end-times/ttCooldownEndTimes.js +++ b/extension/scripts/features/cooldown-end-times/ttCooldownEndTimes.js @@ -1,7 +1,7 @@ "use strict"; (async () => { - const feature = featureManager.registerFeature( + featureManager.registerFeature( "Cooldown End Times", "sidebar", () => settings.pages.sidebar.cooldownEndTimes, @@ -14,11 +14,9 @@ null ); - const iconRegex = /1[97]|39|4\d|5[0-3]/m; async function addEndTimes() { const statusIcons = await requireElement("#sidebarroot [class*='status-icons__']"); statusIcons.addEventListener("mouseover", listener); - let tooltipPortal; async function listener(event) { if (!event.target.closest("li")?.matches("[class*='icon']")) return; diff --git a/extension/scripts/features/opened-supply-pack-value/ttOpenedSupplyPackValue.js b/extension/scripts/features/opened-supply-pack-value/ttOpenedSupplyPackValue.js index 02e15d98f..ef082be9e 100644 --- a/extension/scripts/features/opened-supply-pack-value/ttOpenedSupplyPackValue.js +++ b/extension/scripts/features/opened-supply-pack-value/ttOpenedSupplyPackValue.js @@ -41,7 +41,7 @@ if (params.get("XID") === reqXID || isDrugPackUseRequest(params)) { const totalOpenedValue = json?.items?.itemAppear?.reduce( (totalValue, item) => - (totalValue += item.isMoney ? item.moneyGain.substring(1).getNumber() : torndata.items[item.ID].market_value * item.qty), + totalValue + item.isMoney ? item.moneyGain.substring(1).getNumber() : torndata.items[item.ID].market_value * item.qty, 0 );