mirror of
https://github.com/pmret/website.git
synced 2024-09-18 23:02:28 +02:00
rm old index.js
This commit is contained in:
parent
2369ce48c2
commit
d3f2b40a58
14
src/index.js
14
src/index.js
@ -1,14 +0,0 @@
|
||||
import moment from "moment"
|
||||
|
||||
import("./progress.js").then(async ({ fetchData, functionsChart }) => {
|
||||
const data = await fetchData()
|
||||
|
||||
functionsChart(data, document.getElementById("progress-chart"))
|
||||
|
||||
const first = data[0]
|
||||
const latest = data[data.length - 1]
|
||||
|
||||
document.getElementById("matched-rom-percent").innerText = Math.round((latest.matchingBytes / latest.totalBytes) * 10000) / 100 + "% matched" // TODO: include data
|
||||
document.getElementById("functions-ratio").innerText = latest.matchingFuncs + "/" + latest.totalFuncs
|
||||
document.getElementById("play-time").innerText = moment(latest.timestamp).from(first.timestamp, true)
|
||||
}).catch(console.error)
|
Loading…
Reference in New Issue
Block a user