aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/queryParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/utils/queryParser.ts')
-rw-r--r--webAO/utils/queryParser.ts34
1 files changed, 17 insertions, 17 deletions
diff --git a/webAO/utils/queryParser.ts b/webAO/utils/queryParser.ts
index 1a3cea6..5263f6e 100644
--- a/webAO/utils/queryParser.ts
+++ b/webAO/utils/queryParser.ts
@@ -1,25 +1,25 @@
/* eslint @typescript-eslint/no-explicit-any: "warn" */
interface QueryParams {
- ip: string;
- connect: string;
- mode: string;
- asset: string;
- theme: string;
- serverName: string;
+ ip: string;
+ connect: string;
+ mode: string;
+ asset: string;
+ theme: string;
+ serverName: string;
}
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") || `${protocol}//attorneyoffline.de/base/`,
- theme: urlParams.get("theme") || "default",
- serverName: urlParams.get("serverName") || "Attorney Online session",
- }
- return queryParams as 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") || `${protocol}//attorneyoffline.de/base/`,
+ theme: urlParams.get("theme") || "default",
+ serverName: urlParams.get("serverName") || "Attorney Online session",
+ };
+ return queryParams as QueryParams;
};
export default queryParser;