diff --git a/client/chat.js b/client/chat.js index 3982d369790a15de84bd2a64b71aef5f7404472f..957476b986098b2698b528900f354051b289813d 100644 --- a/client/chat.js +++ b/client/chat.js @@ -1,4 +1,4 @@ -var chatSocket = new WebSocket("ws://localhost:8000"); +var chatSocket = new WebSocket("ws://"+window.location.hostname+":8000"); $(document).ready(function(){ $("#chatInput").keyup(function (e) { @@ -36,7 +36,9 @@ var messageHandlers = { join:function(msg){ addToChat(msg.client.nick+" has joined "+msg.room.name); $("*[data-show-for]").hide(); - $("*[data-show-for='"+msg.room.type+"']").show(); + for(var i=0;i -