replace hard-wired websocket address
for ssh tunnels, we need to use the same adress as given in the address bar, only changing port number to 8010
This commit is contained in:
@@ -238,8 +238,8 @@
|
||||
output.scrollTop = output.scrollHeight;
|
||||
}
|
||||
|
||||
function doConnect() {
|
||||
websocket = new WebSocket("ws://linse-dil5:8010/");
|
||||
function doConnect(uri) {
|
||||
websocket = new WebSocket(uri);
|
||||
websocket.onopen = evt => onOpen(evt);
|
||||
websocket.onclose = evt => onClose(evt);
|
||||
websocket.onmessage = evt => handleMSG(evt.data);
|
||||
@@ -300,7 +300,7 @@
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
doConnect();
|
||||
doConnect('ws://' + window.location.hostname + ':8010/');
|
||||
requestAnimationFrame(processUpdates);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user