aboutsummaryrefslogtreecommitdiff
path: root/webclient
diff options
context:
space:
mode:
Diffstat (limited to 'webclient')
-rw-r--r--webclient/client.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/webclient/client.html b/webclient/client.html
index 218bc22..7ea65cf 100644
--- a/webclient/client.html
+++ b/webclient/client.html
@@ -83,8 +83,10 @@ function reconnect(){
net_callbacks={};
- var host=location.hostname||"localhost";
- sock=new WebSocket("wss://"+host+":29546");
+ var url;
+ if(location.hostname!="")url="wss://"+location.hostname;
+ else url="ws://localhost";
+ sock=new WebSocket(url+":29546");
updateStatus();
updateRoomList();
sock.addEventListener("message",function(msg){