<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
io = io.connect()
room = prompt('type a room name')

// Emit ready event with room name.
io.emit('ready', room)

// Listen for the announce event.
io.on('announce', function(data) {
    // Remove the html tags to prevent XSS
    data = $('<div/>').text(data).text();
  
    $('body').append('<p>'+data.message+ new Date().toString()+'</p>')
})

</script>
