aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/queryParser.ts
diff options
context:
space:
mode:
authorstonedDiscord <stonedDiscord@users.noreply.github.com>2024-11-20 13:31:50 +0000
committerGitHub Action <actions@github.com>2024-11-20 13:31:50 +0000
commit6684f3fce6e90fd0574d7bab63b629554ab03ef6 (patch)
treeb2a62247d17e23a77af57aea355ba621666817c2 /webAO/utils/queryParser.ts
parent95a2d1361d84c61b454ebe506e6963b93f6d8dee (diff)
Prettified Code!
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;