Skip to content

Instantly share code, notes, and snippets.

View Lexicality's full-sized avatar
😼
🧙‍♂️

Lexi Robinson Lexicality

😼
🧙‍♂️
View GitHub Profile
socket.on('chat message', function(msg){
var id = msg.mac.replace(/:/g, '-');
console.info("Got a message with id '%s': %o", id, msg);
if (!$('#' + id).length) {
$('#messages').append($('<li>', { id: id, text: msg.mac }));
}
});