diff options
author | Vitaly Takmazov | 2018-02-17 19:46:37 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-02-17 19:46:37 +0300 |
commit | 318f19c63477e7ba21cf1abc62e62a5249c670a7 (patch) | |
tree | 0c5e84aecf3446cbed87880be371ec3e0c5dd5d4 /juick-www/src/main/static | |
parent | 02f2b569164bf5e89245af2dbef39d0033a862ad (diff) |
www: fix ws for visitors
Diffstat (limited to 'juick-www/src/main/static')
-rw-r--r-- | juick-www/src/main/static/scripts.js | 8 |
1 files changed, 7 insertions, 1 deletions
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); |