3
$\begingroup$

Reviewing funzo time: but why does it say 3 things to review, and only when there are suggested edits.

enter image description here

(full size)

Huh? I'm confused. Why does it say 3 when there's clearly just 1 thing to review?


Sorry, no freehand circles this time, folks.

| |
$\endgroup$
4
$\begingroup$

Once you pass 2,000 rep (for CSE, as it is a beta site), the counter no longer shows suggested edits, but instead shows all 'review tasks' in the system. You may not be eligible to review everything in the queue, for various reasons:

  • You cannot review your own suggested edits or any reviews on your own posts (e.g. Low Quality Posts reviews)

  • You cannot review things you've already reviewed.

  • You cannot perform certain reviews (e.g. First Post reviews or Close Votes) if you've already voted on the post at some earlier point.

The comment by thesecretmaster explains the rationale for this: it's too expensive to generate indications for each person. However, this will probably be solved as a side effect of the new top bar (as seen on Stack Overflow). Since everyone I know has been confused by this at first, I feel that it'd be a welcome change.

| |
$\endgroup$
  • $\begingroup$ The new top bar doesn't help. It still shows a non-personalized review count. $\endgroup$ – Gilles 'SO- stop being evil' Jul 23 '17 at 16:00
  • $\begingroup$ @Gilles It doesn't show any count at all, at least for me. It just lights up if there are supposed to be reviews available (although I don't know if the logic there is equally prone to being wrong). There was originally an actual counter, but that's gone now, unless I'm missing something? $\endgroup$ – Aurora0001 Jul 23 '17 at 16:04
  • $\begingroup$ They tweaked the rules to show the count less often, but the count and the criteria for showing it are still far from useful. $\endgroup$ – Gilles 'SO- stop being evil' Jul 23 '17 at 16:24
1
$\begingroup$

In response to this question, I've created a userscript to pull the real numbers from the /review page every 5 seconds (editable via a setting at the top). Even if you have 100 tabs open, it should only load the stats once every 5 seconds. Here it is (now with colors and 0s hidden):

// ==UserScript==//
// @name         Review Queue Counters
// @version      0.1
// @description  Load some nice little review queue counters at the top of the sceen.
// @author       thesecretmaster
// @match        https://*.stackexchange.com/*
// @exclude      *.chat.*
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_addStyle
// ==/UserScript==//

(function() {
    'use strict';

    // The minimum time between 2 polls.
    // Set in ms
    // Don't set it too low, or you'll get rate limited.
    var poll_frequency = 5000;

    // The frequncy that the elements are refresh
    // and that it checks if it can poll again.
    var loop_frequency = 500;

    // Set color palette
    var pallette = {};
    pallette["Suggested Edits"] = "#CF7721";
    pallette["Close Votes"] = "#97091A";
    pallette["First Posts"] = "#3AAE1C";
    pallette["Late Answers"] = "#da70d6";
    pallette["Reopen Votes"] = "blue";
    pallette["Low Quality Posts"] = "yellow";

    // Clear out the existing counter
    var existing_counters = document.getElementsByClassName("topbar-icon icon-flag icon-tools-flag yes-hover");
    for (var c = 0; c < existing_counters.length; c++) {
         existing_counters[c].remove();
    }

    // httpGetAsync stolen from https://stackoverflow.com/a/4033310/4948732
    // I really didn't want to use jQuery $.get()
    function httpGetAsync(theUrl, callback) {
        var xmlHttp = new XMLHttpRequest();
        xmlHttp.onreadystatechange = function() {
            if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
                callback(xmlHttp.responseText);
        };
        xmlHttp.open("GET", theUrl, true);
        xmlHttp.send(null);
    }

    GM_addStyle("a[count='0'] {display:none !important}");

    function gen_counter(count, name, link) {
        var span = document.createElement("span");
        span.textContent = count;
        span.setAttribute("title", name);
        span.className = "edit-count unread-count";

        var a = document.createElement("a");
        a.className= "topbar-icon icon-flag icon-tools-flag yes-hover";
        a.setAttribute("href", link);
        a.appendChild(span);

        return a;
    }

    var counters = [];

    httpGetAsync("/review", function(content) {
        var pseudo_doc = document.createElement("html");
        pseudo_doc.innerHTML = content;
        GM_setValue("pseudo_doc", content);

        var today = new Date();
        GM_setValue("last_updated", today.getTime());

        var queue_elements = pseudo_doc.getElementsByClassName("dashboard-item");
        for (var i = 0; i < queue_elements.length-1; i++) {
            var queue_element = queue_elements[i];
            var link = queue_element.getElementsByClassName("dashboard-title")[0].children[0].href;
            var name = queue_element.getElementsByClassName("dashboard-title")[0].getElementsByTagName("a")[0].textContent;
            var count = queue_element.getElementsByClassName("dashboard-num")[0].textContent;

            var counter = gen_counter(count, name, link);
            counter.setAttribute("count", count);
            counter.firstChild.style = "background-color:"+pallette[name];
            var links_section = document.getElementsByClassName("topbar-menu-links")[0];
            links_section.insertBefore(counter,links_section.firstChild);
            counters.push(counter);
        }
    });

    setInterval(function() {
        var today = new Date();
        if (today.getTime()-GM_getValue("last_updated") > poll_frequency) {
            GM_setValue("last_updated", today.getTime());
            httpGetAsync("/review", function(content) {
                var pseudo_doc = document.createElement("html");
                pseudo_doc.innerHTML = content;
                GM_setValue("pseudo_doc",content);
            });
        }
    }, loop_frequency);

    setInterval(function(){
        var pseudo_doc = document.createElement("html");
        pseudo_doc.innerHTML = GM_getValue("pseudo_doc");
        var queue_elements = pseudo_doc.getElementsByClassName("dashboard-item");
        for (var a = 0; a < queue_elements.length-1; a++) {
            var queue_element = queue_elements[a];
            var count = queue_element.getElementsByClassName("dashboard-num")[0].firstChild.textContent;
            //console.log(counters[a]);
            counters[a].setAttribute("count",count);
            counters[a].firstChild.innerText = count;
        }
    }, loop_frequency);
})();
| |
$\endgroup$
  • $\begingroup$ Oh XD.... Thanks... but I'm actually someone that uses many ($many=\pm 40$) tabs. $\endgroup$ – ItamarG3 Jul 23 '17 at 5:00
  • $\begingroup$ @ItamarG3 I just fixed it. Go ahead, try it out! $\endgroup$ – thesecretmaster Jul 28 '17 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .