]> git.0d.be Git - panikdb.git/commitdiff
regie: fix protocol check for websocket creation
authorFrédéric Péters <fpeters@0d.be>
Wed, 24 Mar 2021 15:01:38 +0000 (16:01 +0100)
committerFrédéric Péters <fpeters@0d.be>
Wed, 24 Mar 2021 15:01:38 +0000 (16:01 +0100)
panikdb/regie/templates/regie-home.html

index a41518c9ce9bd531dc9c2e0acd802d428d2def25..8d6b0330ee36213b81e4c34e409c189e2498ab9d 100644 (file)
@@ -211,7 +211,7 @@ $(function() {
 <button class="nsp" data-switch="0">Nonstop</button>
 <script>
 $(function() {
-  var ws = new WebSocket((location.protocol == "https" ? "wss://" : "ws://") + location.host + "/ws/switch/");
+  var ws = new WebSocket((location.protocol == "https:" ? "wss://" : "ws://") + location.host + "/ws/switch/");
   ws.onmessage = function (event) {
     var msg = JSON.parse(event.data);
     $('[data-switch!="' + msg.active + '"]').removeClass('active');