From 55ebfb424bf18905e29619465d900e5458f93437 Mon Sep 17 00:00:00 2001 From: HMH Date: Wed, 25 Sep 2024 22:45:03 +0200 Subject: [PATCH] Add url query parameters to websocket url. Fixes #286, that is connecting with an access code set. --- ts/lib.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/lib.ts b/ts/lib.ts index 2889975..a7376b0 100644 --- a/ts/lib.ts +++ b/ts/lib.ts @@ -849,7 +849,10 @@ function init() { check_apis(); let protocol = document.location.protocol == "https:" ? "wss://" : "ws://"; - let webSocket = new WebSocket(protocol + window.location.hostname + ":" + window.location.port + "/ws"); + let webSocket = new WebSocket( + protocol + window.location.hostname + ":" + + window.location.port + "/ws" + window.location.search + ); webSocket.binaryType = "arraybuffer"; settings = new Settings(webSocket);