Add usercount indicator
This commit is contained in:
parent
5ca419d3e3
commit
259c72e7da
3 changed files with 13 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ function initCallbacks() {
|
|||
}
|
||||
});
|
||||
|
||||
socket.on('usercount', function(data) {
|
||||
$('#usercount').text(data.count + " connected users");
|
||||
});
|
||||
|
||||
socket.on('chatMsg', function(data) {
|
||||
var div = formatChatMessage(data);
|
||||
$('#messagebuffer')[0].appendChild(div);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue