User:TheShadowAssassin/chat.js

importScript('User:Joeytje50/ChatLogger.js') function sendMessage{inputValue=$('#Write textarea').val;if(inputValue!=){mainRoom.socket.send(new models.ChatEntry({roomId:this.roomId,name:wgUserName,text:inputValue}).xport);$('#Write textarea').val;$('#Write input[type="submit"]').attr('enabled','enabled');console.log('Message sent!');};};$('#Write input[type="submit"]').show.attr({'value':'Send','enabled':'enabled'}).on('click',sendMessage);$('#Write textarea').keyup(function{if($('#Write textarea').val.length==0){$('#Write input[type="submit"]').attr('enabled','enabled');}else{$('#Write input[type="submit"]').removeAttr('enabled');};});