Skip to main content
2 of 14
deleted 2 characters in body
user avatar
user avatar

Review Stalker user script

This is a very basic user script which does the following:

  • Checks the review homepage if there's anything you can review

    • If so, it changes the title to (n) old_title where n is the number of review tasks you can perform
    • If not, it refreshes the page in 15 seconds

Install the script

This is the script:

// ==UserScript==
// @name        Review Stalker
// @namespace   http://camilstaps.nl
// @description Stalks the StackExchange review pages
// @include     http://*stackexchange.com/review*
// @include     http://stackoverflow.com/review*
// @include     http://serverfault.com/review*
// @include     http://superuser.com/review*
// @include     http://askubuntu.com/review*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js
// @version     1
// @grant       
// ==/UserScript==

var reviews_avail = 0;
var title = document.title;

if (/review\/?$/.test(window.location)) {
    $('.dashboard-num').each(function(index){
        if (!$(this).parent().hasClass('dashboard-faded')) {
            reviews_avail += parseInt($(this).attr('title'));
        }
    });
    if (reviews_avail) {
        window.setTimeout(function(){
            if (title == document.title) {
                document.title = "(" + reviews_avail + ") " + title;
            } else {
                document.title = title;
            }
        }, 300);
    } else {
        console.log('There are no review items');
        window.setTimeout(function(){
            window.location = window.location;
        }, 15000);
    }
}

Install the script

user19139