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
wheren
is the number of review tasks you can perform - If not, it refreshes the page in 15 seconds
- If so, it changes the title to
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://*stackexchange.com/review/
// @include http://stackoverflow.com/review
// @include http://stackoverflow.com/review/
// @include http://serverfault.com/review
// @include http://serverfault.com/review/
// @include http://superuser.com/review
// @include http://superuser.com/review/
// @include http://askubuntu.com/review
// @include http://askubuntu.com/review/
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
// @version 1
// @grant
// ==/UserScript==
var reviews_avail = 0;
var title = document.title;
$('.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 {
window.setTimeout(function(){
window.location = window.location;
}, 15000);
}