aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2023-11-13 00:20:33 +0100
committerDavid Skoland <davidskoland@gmail.com>2023-11-13 00:20:33 +0100
commitc6b046917f71940f75f5028c64298ec146f9a487 (patch)
treeef57dba7ccea154bd0c6eaafa3cba34c15664a3b
parent611b412d4935a905d2bf60c4ec0febc9709ebadd (diff)
Add serverName to serverlist link
-rw-r--r--webAO/master.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/webAO/master.ts b/webAO/master.ts
index 833a0b3..e596406 100644
--- a/webAO/master.ts
+++ b/webAO/master.ts
@@ -137,12 +137,13 @@ function processServerlist(thelist: { name: string, description: string, ip: str
servers[i].online = "Offline";
const ipport = `${serverEntry.ip}:${serverEntry.ws_port}`;
+ const serverName = serverEntry.name;
if (serverEntry.ws_port) {
document.getElementById('masterlist').innerHTML
+= `<li id="server${i}" onmouseover="setServ(${i})"><p>${safeTags(serverEntry.name)}</p>`
- + `<a class="button" href="${myURL}client.html?mode=watch&ip=${ipport}">Watch</a>`
- + `<a class="button" href="${myURL}client.html?mode=join&ip=${ipport}">Join</a></li>`;
+ + `<a class="button" href="${myURL}client.html?mode=watch&ip=${ipport}&serverName=${serverName}">Watch</a>`
+ + `<a class="button" href="${myURL}client.html?mode=join&ip=${ipport}&serverName=${serverName}">Join</a></li>`;
}
}
}