Add files
This commit is contained in:
19
ReallifeGamemode.Client/assets/js/onlinelist/script.js
Normal file
19
ReallifeGamemode.Client/assets/js/onlinelist/script.js
Normal 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 => {
|
||||
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user