summaryrefslogtreecommitdiff
path: root/page.html
diff options
context:
space:
mode:
authorstale <redkugelblitzin@gmail.com>2022-05-03 20:22:43 -0300
committerstale <redkugelblitzin@gmail.com>2022-05-03 20:22:43 -0300
commit88cc92f64dfc4a241410f67b20dec4680461a344 (patch)
tree1fe938cc6013c8f8692881cd1803a27fac3a26a9 /page.html
parent2f9687126ecb538f40b57bd6963129b406786175 (diff)
this is terrible
Diffstat (limited to 'page.html')
-rw-r--r--page.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/page.html b/page.html
index 52cfb77..e2aec9b 100644
--- a/page.html
+++ b/page.html
@@ -45,7 +45,8 @@
</body>
<script>
window.id = NaN;
- let s = new WebSocket(`ws://${window.location.hostname}:31236`);
+ let wsproto = (window.location.protocol == "https:")? "wss:": "ws:";
+ let s = new WebSocket(`${wsproto}//${window.location.hostname}:${window.location.port}`);
let info_elem = document.getElementById("miscinfo");
let board_elem = document.getElementById("board");
let name = "deadbeef";