svghmi/gen_index_xhtml.xslt
branchsvghmi
changeset 3268 d22782b9591f
parent 3264 51645afeded9
child 3276 c696ecf5173a
--- a/svghmi/gen_index_xhtml.xslt	Wed Jun 30 15:51:59 2021 +0200
+++ b/svghmi/gen_index_xhtml.xslt	Thu Jul 01 14:33:14 2021 +0200
@@ -7556,7 +7556,19 @@
 </xsl:text>
           <xsl:text>// Open WebSocket to relative "/ws" address
 </xsl:text>
-          <xsl:text>var ws = new WebSocket(window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws'));
+          <xsl:text>
+</xsl:text>
+          <xsl:text>var ws_url = 
+</xsl:text>
+          <xsl:text>    window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws')
+</xsl:text>
+          <xsl:text>    + '?mode=' + (window.location.hash == "#watchdog" 
+</xsl:text>
+          <xsl:text>                  ? "watchdog"
+</xsl:text>
+          <xsl:text>                  : "multiclient");
+</xsl:text>
+          <xsl:text>var ws = new WebSocket(ws_url);
 </xsl:text>
           <xsl:text>ws.binaryType = 'arraybuffer';
 </xsl:text>