diff options
| author | David Skoland <davidskoland@gmail.com> | 2023-11-13 00:20:33 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2023-11-13 00:20:33 +0100 |
| commit | c6b046917f71940f75f5028c64298ec146f9a487 (patch) | |
| tree | ef57dba7ccea154bd0c6eaafa3cba34c15664a3b /webAO/master.ts | |
| parent | 611b412d4935a905d2bf60c4ec0febc9709ebadd (diff) | |
Add serverName to serverlist link
Diffstat (limited to 'webAO/master.ts')
| -rw-r--r-- | webAO/master.ts | 5 |
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>`; } } } |
