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';
|
import { extractPageTitleFromURL } from './utils/url';
|
||||||
var itemSchema: ItemSchema | null;
|
var itemSchema: ItemSchema | null;
|
||||||
|
|
||||||
var pageLocale: string = 'en'
|
var locale: string = 'en'
|
||||||
|
|
||||||
/** Exclude these from the pricelist. */
|
/** Exclude these from the pricelist. */
|
||||||
const excludedQualities = new Set([
|
const excludedQualities = new Set([
|
||||||
@@ -31,7 +31,6 @@ async function inject() {
|
|||||||
// Not an item page
|
// Not an item page
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const locale = extractLocaleFromURL(document.URL);
|
|
||||||
var itemIndex: number | null = null;
|
var itemIndex: number | null = null;
|
||||||
var itemName: string | 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
|
wipeSchema(); // FIXME: ugly hack. requires additional page reload. if prepareSchema returns null, we should handle it properly
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pageLocale = extractLocaleFromURL(document.URL)
|
locale = extractLocaleFromURL(document.URL)
|
||||||
addStyles();
|
addStyles();
|
||||||
inject();
|
inject();
|
||||||
// TODO: Purge expired price data
|
// TODO: Purge expired price data
|
||||||
|
|||||||
Reference in New Issue
Block a user