parent
5f9e3462ae
commit
7eaedf0f9a
@ -1,4 +1,4 @@
|
||||
export default async function fetchCurrent() {
|
||||
const resp = await fetch("https://data.wowtoken.app/classic/token/current.json");
|
||||
const resp = await fetch("https://data.wowtoken.app/v2/current/classic.json");
|
||||
return await resp.json();
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Track current and historical gold price trends for the World of Warcraft (WoW) Classic in game token, including the US, EU, TW, and KR regions. Prices updated every minute. Simple, quick, and easy info, no ads or tracking, ever.">
|
||||
<link rel="preconnect" href="https://data.wowtoken.app">
|
||||
<link rel="dns-prefetch" href="https://data.wowtoken.app">
|
||||
<link rel="preload" href="https://data.wowtoken.app/classic/token/current.json" as="fetch" type="application/json" crossorigin="anonymous">
|
||||
<link rel="preload" href="https://data.wowtoken.app/v2/current/classic.json" as="fetch" type="application/json" crossorigin="anonymous">
|
||||
<link rel="preload" href="https://data.wowtoken.app/classic/token/history/us/72h.json" as="fetch" type="application/json" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
@ -42,6 +42,9 @@
|
||||
<option value="336h">14 Days</option>
|
||||
<option value="720h">1 Month</option>
|
||||
<option value="90d">3 Months</option>
|
||||
<option value="6m">6 Months</option>
|
||||
<option value="1y">1 Year</option>
|
||||
<option value="2y">2 Years</option>
|
||||
<option value="all">All Available</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -44,11 +44,11 @@ async function updateTokens(data) {
|
||||
}
|
||||
|
||||
async function updateRegionalToken(region, data) {
|
||||
if (currentPriceHash[region] !== data['price_data'][region]) {
|
||||
currentPriceHash[region] = data['price_data'][region];
|
||||
if (currentPriceHash[region] !== data[region][1]) {
|
||||
currentPriceHash[region] = data[region][1];
|
||||
if (region === currentRegionSelection) {
|
||||
formatToken();
|
||||
datum = new Datum(Date.parse(data['update_times'][region]), data['price_data'][region]);
|
||||
datum = new Datum(Date.parse(data[region][0]), data[region][1]);
|
||||
if (currentAggregateSelection === 'none' && chart.active()) {
|
||||
await chart.addDataToChart(datum);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user