From 0b0ae76fae5c7aeb2611cc0346e8ee09c2eb5066 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Tue, 28 Mar 2017 23:22:08 +0200 Subject: webclient: Revert to ws:// on localhost --- webclient/client.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'webclient') 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){ -- cgit v1.2.3-54-g00ecf