diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-11-13 13:44:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-13 13:44:33 +0100 |
| commit | 074114f8157aadc1cd85d55aa7a9343872389ee6 (patch) | |
| tree | ef57dba7ccea154bd0c6eaafa3cba34c15664a3b /webAO/master.ts | |
| parent | 3b57ceff07be9fc86ee5ba73a0614ee754f8f8c6 (diff) | |
| parent | c6b046917f71940f75f5028c64298ec146f9a487 (diff) | |
Merge pull request #196 from Troid-Tech/query-params-and-name
Rework query param parsing and set window title to server name
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>`; } } } |
