phrasing
This commit is contained in:
parent
9904d770af
commit
2d38e11cc7
1 changed files with 3 additions and 3 deletions
|
@ -48,9 +48,8 @@ function checkMinecraftServerStatus() {
|
|||
cs.className = (status.online ? "na" : "err")
|
||||
cs.textContent = status.online ? "ONLINE" : "OFFLINE"
|
||||
const p = document.createElement("span")
|
||||
p.style.marginLeft = "0.5em";
|
||||
if (status.players) {
|
||||
p.textContent = `(${status.players.online}/${status.players.max} players)`
|
||||
p.textContent = ` with ${status.players.online}/${status.players.max} players`
|
||||
if (status.players.online > 0 && status.players.list) {
|
||||
pl = document.createElement("details")
|
||||
pl.style.marginTop = "0"
|
||||
|
@ -61,13 +60,14 @@ function checkMinecraftServerStatus() {
|
|||
const plist = document.createElement("ul")
|
||||
pl.appendChild(pld)
|
||||
pl.appendChild(plist)
|
||||
el.appendChild(pl)
|
||||
for (let p of status.players.list) {
|
||||
const pi = document.createElement("li")
|
||||
pi.textContent = p.name
|
||||
plist.appendChild(pi)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
p.textContent = ` with ??/?? players`
|
||||
}
|
||||
el.replaceChildren(
|
||||
s,
|
||||
|
|
Loading…
Reference in a new issue