From 318f19c63477e7ba21cf1abc62e62a5249c670a7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 17 Feb 2018 19:46:37 +0300 Subject: www: fix ws for visitors --- juick-www/src/main/static/scripts.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index 6a2ba370..588e4fdb 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -131,7 +131,13 @@ function initWS() { if (hash) { url += '?hash=' + hash; } else { - url += pageMID; + let content = document.getElementById('content'); + if (content) { + let pageMID = content.getAttribute('data-mid'); + if (pageMID) { + url += pageMID; + } + } } ws = new WebSocket(url); -- cgit v1.2.3