4

On the Suggested Edits review page, there are five actions you can take:

  1. Accept
  2. Improve Edit
  3. Reject and Edit
  4. Reject
  5. Skip

I wish to know the number of times I have done each action above.

I know that my editor stats are through this method but they are only like: "Gaurang Tandon has approved 38 edit suggestions and rejected 12 edit suggestions and improved 66 edit suggestions". As you can see, it is not a complete statistic.

Update: Years back, there used to be an "Improve" option, and a checkbox "This suggested edit was helpful". I was hoping if the unchecked stats could be merged with the existing "Reject and Edit" stats; and the checked stats could be merged with the existing "Improved Edit" stats.

8
  • There are too many edge cases, because you have to include the older "Improve" action, and then split that into whether or not they checked the "suggested edit was helpful" box. Commented Mar 4, 2018 at 5:24
  • @rene I haven't done more than 550 reviews on SO but it already has 11 pages for me to run this code on! (12 if you include Skips) A great hack, but unsurprisingly inefficient :( I hope you'll come up with a better, 2.0 version. Thanks! Commented Mar 4, 2018 at 7:59
  • Maybe the code I wrote here will be helpful for you. Oh never mind, noticed you already saw it. Commented Mar 4, 2018 at 9:55
  • 1
    @ShadowWizard Oh, yes, that can help! I am not asking for the overruled stats in my question, am only asking for the stats as you posted there. You might wanna migrate your answer from there to here ;) Commented Mar 4, 2018 at 10:00
  • You should post a new question for that new FR. Commented Mar 6, 2018 at 3:11
  • @Ano I do not know why this is a new FR. Commented Mar 6, 2018 at 3:12
  • Ah, you're asking about the script @rene provided? I thought you were asking for a new SE feature. Commented Mar 6, 2018 at 3:13
  • @rene I'm saying that if any answerer can make their script work around that thing also, it would be a bonus help. I'm not asking for a new SE feature. Commented Mar 6, 2018 at 3:17

1 Answer 1

3

The following userscript fetches your review stats from your own suggested-edits review history page. The script only starts if you click My Review history at the bottom of the review history page. (or enter [your site]/review/suggested-edits/history?userId=[your userid] yourself in the adressbar of your browser)

Make sure to have the Developer Console open as it will output its result there.

// ==UserScript==
// @name         suggested edits review stats
// @namespace    https://meta.stackexchange.com/users/158100/rene
// @version      0.1
// @description  suggested edits review stats
// @author       rene
// @match        https://stackoverflow.com/review/suggested-edits/history?*
// @match        https://superuser.com/review/suggested-edits/history?*
// @match        https://serverfault.com/review/suggested-edits/history?*
// @match        https://*.stackexchange.com/review/suggested-edits/history?*
// @grant        none
// ==/UserScript==

(function() {
    var stats={};
    // fetch a single page, given the pagenumber
    function fetchPage(page) {
        // take the query parameter, create an array, remove the page parameter
        var s = document.location.search.split('&').filter( (i) => { return i.indexOf('page') === -1; });
        // next page to fetch
        s.push('page=' + page);
        // get the html
        $.get(document.location.pathname + s.join('&'), function (data) {
            var key;
            // find the a hrefs that have the review action text
            if ($(data).find('.history-table tr td:nth-child(3) a[href^="/review/suggested-edits/"]').each( function(){
                var key = $(this).text().trim();
                // store the key in the stats object
                stats[key] = (stats[key] || 0 ) + 1;
            }).length === 50) { // each page has 50 items
                // schedule the next fetch in 2000 ms
                setTimeout(function(){
                    fetchPage(page + 1);
                }, 2000);
            } else {
                // we're done (page had less then 50 items)
                console.log(stats);
            }
        });
    }
    // start at page 1
    fetchPage(1);
    console.log('processing reviews ...');
})();

The script is tested in Chrome with Tampermonkey.

This is what the result will look like after the script processed all pages of your review history:

review stats in developer console

All review actions (current and past) you're interested in are rolled into above mentioned statistics.

12
  • Great! I'll accept in a week to let others come up with other methods. Thank you! Commented Mar 4, 2018 at 13:22
  • But, can I copy-paste then run it directly in the F12 Dev Console? Commented Mar 4, 2018 at 13:23
  • if I run the script on the https://chemistry.stackexchange.com/users/5026/gaurang-tandon?tab=activity website, then it only counts as many actions as took place on that single page, whereas I have 137 reviews spanning 7 pages... Commented Mar 4, 2018 at 13:29
  • oh i am so dumb. Sorry! :P Commented Mar 4, 2018 at 15:26
  • How does it work with the older "Improve" option? Are those always shown as "Edit", even if one chose to uncheck the "suggested edit was helpful" box? Commented Mar 4, 2018 at 21:15
  • Ah, the current behavior of that is the way I described in my past comment. I'd like to request a feature: add another column for edits I improved but then unchecked the box. (It's impossible to tell between newer "Improve Edit"s and older ones where the box was checked, but they're the same thing.) Commented Mar 5, 2018 at 6:53
  • @GaurangTandon Are you using Edge? You can install Tampermonkey from the Windows Store. Commented Mar 5, 2018 at 6:54
  • Because such reviews aren't really "Improve"ments and IMO shouldn't be lumped in along with it. Commented Mar 5, 2018 at 7:10
  • @rene Yeah I was about to ping you today for the same thing what Ano is saying. I mean, your script works fine for me, but it doesn't give the correct data for the many old, long-time users. If there can be a fix, please try it out. I know it is hard, but I am serious about it, and I am ready to offer a +50 bounty if you can get it to work. Thank you! Commented Mar 5, 2018 at 12:43
  • @rene I meant, as Ano said, years back there used to be an "Improve" option, and a checkbox "This suggested edit was helpful". I was hoping if the unchecked stats could be merged with the existing Reject and Edit; and checked stats could be merged with the existing Edit. I understand it might not be possible from that review page, so that's ok. Commented Mar 6, 2018 at 1:42
  • @rene "Don't those former categories roll into..." Well I don't know if they do. I was only asking. (Sorry for the late reply I didn't get the ping) Commented Mar 9, 2018 at 13:18
  • @rene Oh, if that is so, then you're definitely right. Could you please add this bit to your answer, so that I may mark it as green checked? Commented Mar 9, 2018 at 13:42

You must log in to answer this question.

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