Skip to content

Commit f5f2e05

Browse files
authored
Update glowcomm.js
Updated websocket url logic.
1 parent 4ac6b16 commit f5f2e05

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

vpython/vpython_libraries/glowcomm.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,8 @@ IPython.notebook.kernel.comm_manager.register_target('glow',
3636
} else {
3737
new_uri = "ws:";
3838
}
39-
if (document.location.hostname.includes("localhost")){
40-
url = "ws://localhost:" + port + uri;
41-
}
42-
else {
43-
new_uri += '//' + document.location.host + service_url;
44-
url = new_uri
45-
}
39+
new_uri += '//' + document.location.host + service_url;
40+
url = new_uri
4641
ws = new WebSocket(url);
4742
ws.binaryType = "arraybuffer";
4843

0 commit comments

Comments
 (0)