aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2023-11-20 00:27:12 +0100
committerDavid Skoland <davidskoland@gmail.com>2023-11-20 21:10:04 +0100
commit4035a59b4da2c6bd899f4e0bb91d4fbd5a94a7ac (patch)
tree3c5cdbe4ed897b9cad38fb8c726dbcb2c60e288f /webAO/utils
parent9215c454967540a714b71cfa31d4ad52ad62c5b8 (diff)
More protocol magic
Diffstat (limited to 'webAO/utils')
-rw-r--r--webAO/utils/queryParser.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/webAO/utils/queryParser.ts b/webAO/utils/queryParser.ts
index a8b82d9..1a3cea6 100644
--- a/webAO/utils/queryParser.ts
+++ b/webAO/utils/queryParser.ts
@@ -10,12 +10,13 @@ interface QueryParams {
}
const queryParser = (): QueryParams => {
+ const protocol = window.location.protocol;
const urlParams = new URLSearchParams(window.location.search);
const queryParams = {
ip: urlParams.get("ip") || "",
connect: urlParams.get("connect") || "",
mode: urlParams.get("mode") || "join",
- asset: urlParams.get("asset") || "http://attorneyoffline.de/base/",
+ asset: urlParams.get("asset") || `${protocol}//attorneyoffline.de/base/`,
theme: urlParams.get("theme") || "default",
serverName: urlParams.get("serverName") || "Attorney Online session",
}