From 6c6c94db9e81bc83c7ac5ce6d338541415752a26 Mon Sep 17 00:00:00 2001 From: xenticore Date: Thu, 1 May 2025 18:56:54 -0400 Subject: [PATCH] refactor: make noisy logs debug only --- src/content/content.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/content/content.ts b/src/content/content.ts index 3f0feac..9d0afae 100644 --- a/src/content/content.ts +++ b/src/content/content.ts @@ -215,7 +215,7 @@ async function inject() { const promises = qualities.filter(x => !excludedQualities.has(x)).map(async (quality) => { const qualifiedName = ((quality != 6 ? itemQualities[quality as unknown as keyof typeof itemQualities].toString() : '') + ' ' + itemName).trim() - // logDebug(`Fetching price for ${qualifiedName}`) + logDebug(`Saving price for ${qualifiedName}`) let data: ItemPriceData | null try { @@ -235,7 +235,7 @@ async function inject() { if(itemSchema[itemIndex].hasAustraliumVariant) { promises.push(fetchPrice(token, `${itemIndex};11;australium`, currentTime).then(data => { updateTime = new Date(data.update) - log(`Saving price for Australium ${itemName}`) + logDebug(`Saving price for Australium ${itemName}`) const priceRow = createPriceRow($T("Australium"), data, keyPrice, exchangeRates, locale, "https://wiki.teamfortress.com/wiki/Australium_weapons") @@ -263,7 +263,7 @@ async function inject() { promises.push(fetchPrice(token, `${itemSchema[itemIndex].festiveVariant};6`, currentTime).then(data => { updateTime = new Date(data.update) - log(`updateTime price for Festive ${itemName}`) + logDebug(`Saving price for Festive ${itemName}`) const priceRow = createPriceRow($T("Unique"), data, keyPrice, exchangeRates, locale) @@ -275,7 +275,7 @@ async function inject() { })) promises.push(fetchPrice(token, `${itemSchema[itemIndex].festiveVariant};11`, currentTime).then(data => { updateTime = new Date(data.update) - log(`Saving price for Strange Festive ${itemName}`) + logDebug(`Saving price for Strange Festive ${itemName}`) const priceRow = createPriceRow($T("Strange"), data, keyPrice, exchangeRates, locale) @@ -351,7 +351,6 @@ async function inject() { itemSchema[itemIndex].botkillerVariants.map((variantIndex) => { const itemName = itemSchema[variantIndex].name - // FIXME: variantName should match wiki display name const variantName = itemName.includes('Mk.II') ? itemName.split(' ')[0] + ' Mk.II' : itemName.split(' ')[0] promises.push(fetchPrice(token, `${variantIndex};11`, currentTime).then(data => { logDebug(`Saving price for ${itemName}`)