svghmi/svghmi.js
branchsvghmi
changeset 3268 d22782b9591f
parent 3206 4fd7bd10e606
child 3299 8b45d8494fae
--- a/svghmi/svghmi.js	Wed Jun 30 15:51:59 2021 +0200
+++ b/svghmi/svghmi.js	Thu Jul 01 14:33:14 2021 +0200
@@ -30,7 +30,13 @@
 };
 
 // Open WebSocket to relative "/ws" address
-var ws = new WebSocket(window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws'));
+
+var ws_url = 
+    window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws')
+    + '?mode=' + (window.location.hash == "#watchdog" 
+                  ? "watchdog"
+                  : "multiclient");
+var ws = new WebSocket(ws_url);
 ws.binaryType = 'arraybuffer';
 
 const dvgetters = {