Created
July 17, 2012 13:53
-
-
Save jrusbatch/3129503 to your computer and use it in GitHub Desktop.
Jabber Count
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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