diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-03-28 23:22:08 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-03-28 23:22:08 +0200 |
commit | 0b0ae76fae5c7aeb2611cc0346e8ee09c2eb5066 (patch) | |
tree | bd11cb155c0792cc7e22c80e53c9758b015bf080 /webclient/client.html | |
parent | 8affdf7fe871c78783d63093cc9006867f67e929 (diff) |
webclient: Revert to ws:// on localhost
Diffstat (limited to 'webclient/client.html')
-rw-r--r-- | webclient/client.html | 6 |
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){ |