aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/utils')
-rw-r--r--webAO/utils/queryParser.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/webAO/utils/queryParser.ts b/webAO/utils/queryParser.ts
index f934ac6..1a3cea6 100644
--- a/webAO/utils/queryParser.ts
+++ b/webAO/utils/queryParser.ts
@@ -2,6 +2,7 @@
interface QueryParams {
ip: string;
+ connect: string;
mode: string;
asset: string;
theme: string;
@@ -9,13 +10,15 @@ 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"
+ serverName: urlParams.get("serverName") || "Attorney Online session",
}
return queryParams as QueryParams;
};