Greasy Fork

Greasy Fork is available in English.

Review Stalker

Stalks the StackExchange review pages

当前为 2014-09-09 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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/
// @version     1.1
// @grant       
// ==/UserScript==

var RS_reviews_avail = 0;

function RS_parseInt(string) {
    var got_decimal_point = false;
    var divider = 10;
    var result = 0;
    for (var i = 0; i < string.length; i++) {
        var char = string.substring(i,i+1);
        if (char >= '0' && char <= '9') {
            if (!got_decimal_point) {
                result *= 10;
                result += parseInt(char);
            } else {
                result += parseInt(char) / divider;
                divider *= 10;
            }
        } else if (char == ',') {
        } else {
            return -1;
        }
    }
    return result;
}

function RS_hasClass(element, cls) {
    return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
}

var RS_numbers = document.getElementsByClassName("dashboard-num");
for (var RS_i = RS_numbers.length - 1; RS_i >= 0; RS_i--) {
    if (!RS_hasClass(RS_numbers[RS_i].parentNode, "dashboard-faded")) {
        var int = RS_parseInt(RS_numbers[RS_i].getAttribute('title'));
        RS_reviews_avail += int;
    }
}

if (RS_reviews_avail) {
    window.setTimeout(function(){
        document.title = "(" + RS_reviews_avail + ") " + document.title;
    }, 300);
} else {
    window.setTimeout(function(){
        window.location = window.location;
    }, 15000);
}