You've already forked tf2wikipricing
fix: redundant page locale check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user