summaryrefslogtreecommitdiff
path: root/page.html
diff options
context:
space:
mode:
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";