Update main.js

in this way we can use query string parameters on index.html without websocket errors
This commit is contained in:
Marco Duiker
2019-04-18 12:02:05 +02:00
committed by GitHub
parent af0cbfbf6c
commit 8e3ae038f8
+1 -1
View File
@@ -210,7 +210,7 @@ jQuery(function($){
return;
}
var ws_url = window.location.href.replace('http', 'ws'),
var ws_url = window.location.href.split('?')[0].replace('http', 'ws'),
join = (ws_url[ws_url.length-1] === '/' ? '' : '/'),
url = ws_url + join + 'ws?id=' + msg.id,
sock = new window.WebSocket(url),