Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // works incorrectly if you refresh
- overflow = $(".robin-user-list-overflow-indicator");
- if (typeof(overflow === 'undefined')) {
- addU = 0;
- }
- else {
- addU = - - $(".robin-user-list-overflow-indicator").html().split(" ")[1] - 1;
- }
- users = $('#robinUserList').children().length + addU;
- coef = (users / Math.min(201, users));
- str = "";
- a = [];
- b = $(".robin-message--from");
- endsIn = - - $(".robin-message--message")[1].innerHTML.split(" ")[5];
- if (!(endsIn < 0) && !(endsIn > 0)) { // if is NaN
- endsIn = 31
- }
- timeSinceStart = (Date.now() - Date.parse($(".robin-message--timestamp").attr("datetime")));
- tillEnd = 1000 * 60 * (endsIn) - timeSinceStart;
- mps = Math.floor((b.length / timeSinceStart) * 100000) / 100;
- for (var i = 0; i < b.length; ++i) {
- str = b[i].innerHTML;
- if (a.indexOf(str) === -1) {
- a.push(str);
- }
- }
- $(".text-counter-input").val('Stats 1.5:' +
- ' USERS: ' + users +
- ' LURKERS: ' + (users - a.length + 2) +
- ' | G:' + Math.floor($('#robinUserList > .robin--vote-class--increase').length * coef) +
- ' | S:' + Math.floor($('#robinUserList > .robin--vote-class--continue').length * coef) +
- ' | A:' + Math.floor($('#robinUserList > .robin--vote-class--abandon').length * coef) +
- ' | N: ' + Math.floor($('#robinUserList > .robin--vote-class--novote').length * coef) +
- ' | M:' + $(".robin-message").length +
- " | mps: " + mps +
- " | mpmu: " + (Math.floor((mps / users) * 10000 * 60) / 10000) +
- " End in " + Math.floor((tillEnd / 60000) * 100) / 100 + " min "
- ).submit();
- setTimeout(function() {$(".text-counter-input").val("Explanation: [G]row, [S]tay, [A]bandon, [N]ot particiapting. mps: total messages per second. mpmu: messages per minute per user.").submit()}, 500);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement