aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-03-28 21:51:20 +0200
committerstonedDiscord <Tukz@gmx.de>2022-03-28 21:51:20 +0200
commit3250dd8b89d444fb4d7b44ef9a0fe7fbd0e4a003 (patch)
treeaa8e606aac4472d16491993e52ec66900915c1a0
parentce9ced5c8beb4590b95051930a9bacf83b21762a (diff)
parentd3911aa9ad6bc16c70355fe11d1377d636b14565 (diff)
Merge branch 'master' into 2fa
-rw-r--r--webAO/master.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/master.ts b/webAO/master.ts
index a48f4e9..5c538d4 100644
--- a/webAO/master.ts
+++ b/webAO/master.ts
@@ -132,6 +132,7 @@ function cachedServerlist(response: Response) {
}
function processServerlist(thelist: { name: string, description: string, ip: string, port: number, ws_port: number, assets: string, online: string }[]) {
+ const myURL: string = window.location.href.replace('https://','http://');
for (let i = 0; i < thelist.length - 1; i++) {
const serverEntry: { name: string, description: string, ip: string, port: number, ws_port: number, assets: string, online: string } = thelist[i];
@@ -142,14 +143,13 @@ function processServerlist(thelist: { name: string, description: string, ip: str
if (serverEntry.ws_port) {
document.getElementById('masterlist').innerHTML
+= `<li id="server${i}" onmouseover="setServ(${i})"><p>${safeTags(serverEntry.name)}</p>`
- + `<a class="button" href="client.html?mode=watch&ip=${ipport}">Watch</a>`
- + `<a class="button" href="client.html?mode=join&ip=${ipport}">Join</a></li>`;
+ + `<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>`;
}
}
}
function processVersion(data: string) {
- console.debug(data);
document.getElementById('clientinfo').innerHTML = `Client version: ${version}`;
document.getElementById('serverinfo').innerHTML = `Master server version: ${data}`;
}