Skip to content

Instantly share code, notes, and snippets.

@programatt
Created July 17, 2012 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programatt/3129683 to your computer and use it in GitHub Desktop.
Save programatt/3129683 to your computer and use it in GitHub Desktop.
Jabbr user count every 10 seconds
setInterval(function(){
var totalPop = 0
, roomPops = $('#userlist-lobby .room .count').text().match(/\d+/g);
for (var i = 0, l = roomPops.length; i < l; i++) {
totalPop += parseInt(roomPops[i]);
}
console.log(totalPop);
},10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment