From fae0fca7aabb81325a296a1d6202239c3db44b60 Mon Sep 17 00:00:00 2001 From: stale Date: Fri, 20 May 2022 06:39:58 -0300 Subject: wip room support --- assets/client.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'assets/client.js') diff --git a/assets/client.js b/assets/client.js index 0e90d4b..f888104 100644 --- a/assets/client.js +++ b/assets/client.js @@ -3,9 +3,11 @@ window.name = "anon"; window.clr = "#f03333"; window.info_elem = document.getElementById("miscinfo"); window.info_elem.innerHTML =` - - - `; +
+ + + +
`; window.board_elem = document.getElementById("board"); window.bwidth = NaN; window.bheight = NaN; @@ -25,7 +27,7 @@ function register() { function connect() { let wsproto = (window.location.protocol == "https:")? "wss:": "ws:"; - let s = new WebSocket(`${wsproto}//${window.location.hostname}:${window.location.port}${window.location.pathname}ws`); + let s = new WebSocket(`${wsproto}//${location.hostname}:${location.port}${location.pathname}/ws`); s.onopen = function() { s.send(`register ${window.name} ${window.clr}`); } -- cgit v1.2.3