Panel terminé + Refresh token auto
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user