summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html3
1 files changed, 1 insertions, 2 deletions
diff --git a/index.html b/index.html
index cf54958..a3b605d 100644
--- a/index.html
+++ b/index.html
@@ -58,8 +58,7 @@
<script>
class Board {
constructor(elem) {
-
- this.socket = new WebSocket(`ws://${window.location.host}/socket`)
+ this.socket = new WebSocket(`${location.protocol.includes('s') ? 'wss' : 'ws'}://${window.location.host}/socket`)
this.exiting = false
this.boardState = {}
window.addEventListener('beforeunload', () => {