You've already forked tf2wikipricing
feat: add australiums to price table
This commit is contained in:
@@ -2,13 +2,16 @@ import { ItemPriceData } from "./priceService";
|
||||
import { formatPrice } from "./utils/formatting";
|
||||
import { $T } from "./utils/localization";
|
||||
|
||||
export function createPriceRow(qualityName: string, data: ItemPriceData, keyPrice: ItemPriceData, locale: string): HTMLTableRowElement {
|
||||
export function createPriceRow(qualityName: string, data: ItemPriceData, keyPrice: ItemPriceData, locale: string, wikiPage: string = null): HTMLTableRowElement {
|
||||
const priceRow = document.createElement("tr");
|
||||
|
||||
const priceLabel = document.createElement("td");
|
||||
priceLabel.className = "infobox-label";
|
||||
const priceLabelLink = document.createElement("a");
|
||||
priceLabelLink.href = locale === 'en' ? `https://wiki.teamfortress.com/wiki/${qualityName}` : `https://wiki.teamfortress.com/wiki/${qualityName}/${locale}`
|
||||
if (wikiPage == null) {
|
||||
wikiPage = `https://wiki.teamfortress.com/wiki/${qualityName}`
|
||||
}
|
||||
priceLabelLink.href = locale === 'en' ? wikiPage : `${wikiPage}/${locale}`
|
||||
priceLabelLink.innerText = $T(qualityName)
|
||||
priceLabel.appendChild(priceLabelLink);
|
||||
priceLabel.innerHTML += ':'
|
||||
|
||||
Reference in New Issue
Block a user