Skip to content

Instantly share code, notes, and snippets.

@jrusbatch
Created July 17, 2012 13:53
Show Gist options
  • Save jrusbatch/3129503 to your computer and use it in GitHub Desktop.
Save jrusbatch/3129503 to your computer and use it in GitHub Desktop.
Jabber Count
(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]);
}
return totalPop;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment