From 799e76bdc7b5cb11437dfbf9578a4589ebd825e1 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Fri, 20 Jun 2025 19:19:06 +0200 Subject: [PATCH] prettier --- static/webui/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/webui/script.js b/static/webui/script.js index a6b1fa03..494b597b 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -1,9 +1,9 @@ function openWebSocket() { window.ws = new WebSocket("/custom/ws"); - window.ws.onmessage = (e) => { + window.ws.onmessage = e => { const msg = JSON.parse(e.data); if ("ports" in msg) { - location.port = (location.protocol == "https:" ? msg.ports.https : msg.ports.http); + location.port = location.protocol == "https:" ? msg.ports.https : msg.ports.http; } if ("config_reloaded" in msg) { //window.is_admin = undefined; @@ -12,7 +12,7 @@ function openWebSocket() { } } }; - window.ws.onclose = function() { + window.ws.onclose = function () { setTimeout(openWebSocket, 3000); }; }