summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-11-27 19:44:37 +0100
committernea <romangraef@gmail.com>2022-11-27 19:44:37 +0100
commit904d5234a47c14ff14fd5ef2763261c8f6eedd95 (patch)
tree5bd6a6b5d98c1c50cfbd8f296639c3f2171d67aa /index.html
parentced516b4a197c5f320431988d16d01d97d2cca32 (diff)
downloadchess-904d5234a47c14ff14fd5ef2763261c8f6eedd95.tar.gz
chess-904d5234a47c14ff14fd5ef2763261c8f6eedd95.tar.bz2
chess-904d5234a47c14ff14fd5ef2763261c8f6eedd95.zip
make hostable
Diffstat (limited to 'index.html')
-rw-r--r--index.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.html b/index.html
index bb43cc5..cf54958 100644
--- a/index.html
+++ b/index.html
@@ -58,7 +58,8 @@
<script>
class Board {
constructor(elem) {
- this.socket = new WebSocket('ws://localhost:8000/socket')
+
+ this.socket = new WebSocket(`ws://${window.location.host}/socket`)
this.exiting = false
this.boardState = {}
window.addEventListener('beforeunload', () => {