Add files

This commit is contained in:
Luke
2021-04-18 23:02:26 +00:00
parent a56b30c1d5
commit 1ad1cf75fc
5 changed files with 436 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
window.onbeforeunload = () => { window.scrollTo(0, 0); }
setPlayerCount = (factionId, value) => {
if (factionId == -1) {
document.getElementById('player-count').innerHTML = value;
} else if (factionId >= 0 && factionId <= 9) {
document.getElementById(factionId).innerHTML = value;
}
}
addPlayerEntry = (userId, userName, factionId, factionName, userPing) => {
document.getElementById('players').innerHTML += `<tr><td>${userId}</td> <td>${userName}</td> <td class="group group--${factionId}">${factionName}</td> <td>${userPing}</td></tr>`;
}
addPlayerEntries = (json) => {
JSON.parse(json).forEach(e => {
});
}