Panel terminé + Refresh token auto

This commit is contained in:
Zachary Guénot
2023-05-11 00:37:16 +02:00
parent de01c981f8
commit 8846299424
18 changed files with 251 additions and 64 deletions

View File

@@ -8,10 +8,20 @@ xhr.onload = () => {
let tbodyRef = document.getElementById('table').getElementsByTagName('tbody')[0]
for (let entry of data.scoreboard) {
for (entry of data.scoreboard) {
let row = tbodyRef.insertRow()
row.insertCell().appendChild(document.createTextNode(data.scoreboard.indexOf(entry) + 1))
row.insertCell().appendChild(document.createTextNode(entry.user_name))
row.insertCell().appendChild(document.createTextNode(entry.count))
let i = 0
for (cell of row.cells) {
i++
if (i === 1) cell.className = "row__rank"
if (i === 2) cell.className = "row__pseudos"
if (i === 3) cell.className = "row__arrows"
}
}
} else console.error('Error:', xhr.statusText)
}