aboutsummaryrefslogtreecommitdiff
path: root/webclient
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-28 23:22:08 +0200
committertomsmeding <tom.smeding@gmail.com>2017-03-28 23:22:08 +0200
commit0b0ae76fae5c7aeb2611cc0346e8ee09c2eb5066 (patch)
treebd11cb155c0792cc7e22c80e53c9758b015bf080 /webclient
parent8affdf7fe871c78783d63093cc9006867f67e929 (diff)
webclient: Revert to ws:// on localhost
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){