function chat(e){return e.preventDefault(),!1}function printMessage(e){var t=' <div class="message"><div class="card-panel black"><div class="chip">'+e.time+'</div><p class="chat-p">'+e.content+"</p></div></div>";document.querySelector("div.messages").innerHTML+=t}function printType(e){document.getElementById("type").style.display="block"}function chat(e){e.preventDefault();var t=document.getElementById("chatmsg").value;return console.log(t),t?socket.emit("chat",t):alert("Fill something in"),!1}function typing(){socket.emit("typing")}function setTitle(e){title.innerHTML=e}var socket=io("http://52.66.166.65:3000"),title=document.getElementsByTagName("title")[0];socket.on("disconnect",function(){setTitle("disconnected | Chat")}),socket.on("connect",function(){setTitle("connected | Chat")}),socket.on("message",function(e){printMessage(e)}),socket.on("typemsg",function(e){printType(e)}),setInterval(function(){document.getElementById("type").style.display="none"},5e3);