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