From 0a52bca2294e5a1027dae97fc0f63f947b4c0ead Mon Sep 17 00:00:00 2001 From: xenticore Date: Fri, 28 Mar 2025 23:59:14 -0400 Subject: [PATCH] fix: redundant page locale check --- src/content/content.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/content/content.ts b/src/content/content.ts index 052cf9e..a8ce368 100644 --- a/src/content/content.ts +++ b/src/content/content.ts @@ -11,7 +11,7 @@ import { findFirstElement, findFirstChildElement } from './utils/dom' import { extractPageTitleFromURL } from './utils/url'; var itemSchema: ItemSchema | null; -var pageLocale: string = 'en' +var locale: string = 'en' /** Exclude these from the pricelist. */ const excludedQualities = new Set([ @@ -31,7 +31,6 @@ async function inject() { // Not an item page return; } - const locale = extractLocaleFromURL(document.URL); var itemIndex: number | null = null; var itemName: string | null = null; @@ -283,7 +282,7 @@ prepareSchema().then(function (schema) { wipeSchema(); // FIXME: ugly hack. requires additional page reload. if prepareSchema returns null, we should handle it properly return; } - pageLocale = extractLocaleFromURL(document.URL) + locale = extractLocaleFromURL(document.URL) addStyles(); inject(); // TODO: Purge expired price data