From 4035a59b4da2c6bd899f4e0bb91d4fbd5a94a7ac Mon Sep 17 00:00:00 2001 From: David Skoland Date: Mon, 20 Nov 2023 00:27:12 +0100 Subject: More protocol magic --- webAO/utils/queryParser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webAO/utils') 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", } -- cgit