diff --git a/configurator.py b/configurator.py index f505c6b..b21287a 100755 --- a/configurator.py +++ b/configurator.py @@ -2108,7 +2108,9 @@ INDEX = Template(r""" id: 1, type: "subscribe_events" }; - ws.send(JSON.stringify(auth)); + if (document.getElementById("ws_password").value) { + ws.send(JSON.stringify(auth)); + } ws.send(JSON.stringify(data)); }); ws.onmessage = function(event) { diff --git a/dev.html b/dev.html index a493208..65c6c8f 100644 --- a/dev.html +++ b/dev.html @@ -2021,7 +2021,9 @@ id: 1, type: "subscribe_events" }; - ws.send(JSON.stringify(auth)); + if (document.getElementById("ws_password").value) { + ws.send(JSON.stringify(auth)); + } ws.send(JSON.stringify(data)); }); ws.onmessage = function(event) {