Greasy Fork

Greasy Fork is available in English.

NGA Auto Pager V2

NGA自动翻页插件。由于js_forum.js:1091行对页数的限制,此插件只能自动加载前10页。

当前为 2017-10-16 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        NGA Auto Pager V2
// @version     1.04
// @description NGA自动翻页插件。由于js_forum.js:1091行对页数的限制,此插件只能自动加载前10页。
// @match		http*://bbs.ngacn.cc/read.php*
// @match		http*://nga.178.com/read.php*
// @match		http*://bbs.nga.cn/read.php*
// @match		http*://bbs.bigccq.cn/read.php*
// @match		http*://bbs.ngacn.cc/thread.php*
// @match		http*://nga.178.com/thread.php*
// @match		http*://bbs.nga.cn/thread.php*
// @match		http*://bbs.bigccq.cn/thread.php*
// @match		http*://bbs.ngacn.cc/wow*
// @match		http*://nga.178.com/wow*
// @match		http*://bbs.nga.cn/wow*
// @match		http*://bbs.bigccq.cn/wow*
// @match		http*://bbs.ngacn.cc/wow/pvp*
// @match		http*://nga.178.com/wow/pvp*
// @match		http*://bbs.nga.cn/wow/pvp*
// @match		http*://bbs.bigccq.cn/wow/pvp*
// @match		http*://bbs.ngacn.cc/wow/pve*
// @match		http*://nga.178.com/wow/pve*
// @match		http*://bbs.nga.cn/wow/pve*
// @match		http*://bbs.bigccq.cn/wow/pve*
// @match		http*://bbs.ngacn.cc/wow/rogue*
// @match		http*://nga.178.com/wow/rogue*
// @match		http*://bbs.nga.cn/wow/rogue*
// @match		http*://bbs.bigccq.cn/wow/rogue*
// @match		http*://bbs.ngacn.cc/wow/druid*
// @match		http*://nga.178.com/wow/druid*
// @match		http*://bbs.nga.cn/wow/druid*
// @match		http*://bbs.bigccq.cn/wow/druid*
// @match		http*://bbs.ngacn.cc/wow/dk*
// @match		http*://nga.178.com/wow/dk*
// @match		http*://bbs.nga.cn/wow/dk*
// @match		http*://bbs.bigccq.cn/wow/dk*
// @match		http*://bbs.ngacn.cc/wow/mage*
// @match		http*://nga.178.com/wow/mage*
// @match		http*://bbs.nga.cn/wow/mage*
// @match		http*://bbs.bigccq.cn/wow/mage*
// @match		http*://bbs.ngacn.cc/wow/monk*
// @match		http*://nga.178.com/wow/monk*
// @match		http*://bbs.nga.cn/wow/monk*
// @match		http*://bbs.bigccq.cn/wow/monk*
// @match		http*://bbs.ngacn.cc/wow/priest*
// @match		http*://nga.178.com/wow/priest*
// @match		http*://bbs.nga.cn/wow/priest*
// @match		http*://bbs.bigccq.cn/wow/priest*
// @match		http*://bbs.ngacn.cc/wow/shaman*
// @match		http*://nga.178.com/wow/shaman*
// @match		http*://bbs.nga.cn/wow/shaman*
// @match		http*://bbs.bigccq.cn/wow/shaman*
// @match		http*://bbs.ngacn.cc/wow/paladin*
// @match		http*://nga.178.com/wow/paladin*
// @match		http*://bbs.nga.cn/wow/paladin*
// @match		http*://bbs.bigccq.cn/wow/paladin*
// @match		http*://bbs.ngacn.cc/wow/warrior*
// @match		http*://nga.178.com/wow/warrior*
// @match		http*://bbs.nga.cn/wow/warrior*
// @match		http*://bbs.bigccq.cn/wow/warrior*
// @match		http*://bbs.ngacn.cc/wow/warlock*
// @match		http*://nga.178.com/wow/warlock*
// @match		http*://bbs.nga.cn/wow/warlock*
// @match		http*://bbs.bigccq.cn/wow/warlock*
// @match		http*://bbs.ngacn.cc/wow/hunter*
// @match		http*://nga.178.com/wow/hunter*
// @match		http*://bbs.nga.cn/wow/hunter*
// @match		http*://bbs.bigccq.cn/wow/hunter*
// @match		http*://bbs.ngacn.cc/wow/ui*
// @match		http*://nga.178.com/wow/ui*
// @match		http*://bbs.nga.cn/wow/ui*
// @match		http*://bbs.bigccq.cn/wow/ui*
// @match		http*://bbs.ngacn.cc/wow/lore*
// @match		http*://nga.178.com/wow/lore*
// @match		http*://bbs.nga.cn/wow/lore*
// @match		http*://bbs.bigccq.cn/wow/lore*
// @match		http*://bbs.ngacn.cc/it*
// @match		http*://nga.178.com/it*
// @match		http*://bbs.nga.cn/it*
// @match		http*://bbs.bigccq.cn/it*
// @match		http*://bbs.ngacn.cc/auto*
// @match		http*://nga.178.com/auto*
// @match		http*://bbs.nga.cn/auto*
// @match		http*://bbs.bigccq.cn/auto*
// @match		http*://bbs.ngacn.cc/ink*
// @match		http*://nga.178.com/ink*
// @match		http*://bbs.nga.cn/ink*
// @match		http*://bbs.bigccq.cn/ink*
// @match		http*://bbs.ngacn.cc/ng2*
// @match		http*://nga.178.com/ng2*
// @match		http*://bbs.nga.cn/ng2*
// @match		http*://bbs.bigccq.cn/ng2*
// @match		http*://bbs.ngacn.cc/play*
// @match		http*://nga.178.com/play*
// @match		http*://bbs.nga.cn/play*
// @match		http*://bbs.bigccq.cn/play*
// @match		http*://bbs.ngacn.cc/tvgame*
// @match		http*://nga.178.com/tvgame*
// @match		http*://bbs.nga.cn/tvgame*
// @match		http*://bbs.bigccq.cn/tvgame*
// @match		http*://bbs.ngacn.cc/wa2*
// @match		http*://nga.178.com/wa2*
// @match		http*://bbs.nga.cn/wa2*
// @match		http*://bbs.bigccq.cn/wa2*
// @match		http*://bbs.ngacn.cc/wow/justice*
// @match		http*://nga.178.com/wow/justice*
// @match		http*://bbs.nga.cn/wow/justice*
// @match		http*://bbs.bigccq.cn/wow/justice*
// @match		http*://bbs.ngacn.cc/wow/job*
// @match		http*://nga.178.com/wow/job*
// @match		http*://bbs.nga.cn/wow/job*
// @match		http*://bbs.bigccq.cn/wow/job*
// @match		http*://bbs.ngacn.cc/ccq*
// @match		http*://nga.178.com/ccq*
// @match		http*://bbs.nga.cn/ccq*
// @match		http*://bbs.bigccq.cn/ccq*
// @match		http*://bbs.ngacn.cc/gw2*
// @match		http*://nga.178.com/gw2*
// @match		http*://bbs.nga.cn/gw2*
// @match		http*://bbs.bigccq.cn/gw2*
// @match		http*://bbs.ngacn.cc/bns*
// @match		http*://nga.178.com/bns*
// @match		http*://bbs.nga.cn/bns*
// @match		http*://bbs.bigccq.cn/bns*
// @match		http*://bbs.ngacn.cc/heroes*
// @match		http*://nga.178.com/heroes*
// @match		http*://bbs.nga.cn/heroes*
// @match		http*://bbs.bigccq.cn/heroes*
// @match		http*://bbs.ngacn.cc/lol*
// @match		http*://nga.178.com/lol*
// @match		http*://bbs.nga.cn/lol*
// @match		http*://bbs.bigccq.cn/lol*
// @match		http*://bbs.ngacn.cc/hs*
// @match		http*://nga.178.com/hs*
// @match		http*://bbs.nga.cn/hs*
// @match		http*://bbs.bigccq.cn/hs*
// @match		http*://bbs.ngacn.cc/wot*
// @match		http*://nga.178.com/wot*
// @match		http*://bbs.nga.cn/wot*
// @match		http*://bbs.bigccq.cn/wot*
// @match		http*://bbs.ngacn.cc/wowp*
// @match		http*://nga.178.com/wowp*
// @match		http*://bbs.nga.cn/wowp*
// @match		http*://bbs.bigccq.cn/wowp*
// @match		http*://bbs.ngacn.cc/wows*
// @match		http*://nga.178.com/wows*
// @match		http*://bbs.nga.cn/wows*
// @match		http*://bbs.bigccq.cn/wows*
// @match		http*://bbs.ngacn.cc/jx3*
// @match		http*://nga.178.com/jx3*
// @match		http*://bbs.nga.cn/jx3*
// @match		http*://bbs.bigccq.cn/jx3*
// @match		http*://bbs.ngacn.cc/coc*
// @match		http*://nga.178.com/coc*
// @match		http*://bbs.nga.cn/coc*
// @match		http*://bbs.bigccq.cn/coc*
// @match		http*://bbs.ngacn.cc/pad*
// @match		http*://nga.178.com/pad*
// @match		http*://bbs.nga.cn/pad*
// @match		http*://bbs.bigccq.cn/pad*
// @match		http*://bbs.ngacn.cc/d3*
// @match		http*://nga.178.com/d3*
// @match		http*://bbs.nga.cn/d3*
// @match		http*://bbs.bigccq.cn/d3*
// @match		http*://bbs.ngacn.cc/dota*
// @match		http*://nga.178.com/dota*
// @match		http*://bbs.nga.cn/dota*
// @match		http*://bbs.bigccq.cn/dota*
// @match		http*://bbs.ngacn.cc/wt*
// @match		http*://nga.178.com/wt*
// @match		http*://bbs.nga.cn/wt*
// @match		http*://bbs.bigccq.cn/wt*
// @match		http*://bbs.ngacn.cc/ff14*
// @match		http*://nga.178.com/ff14*
// @match		http*://bbs.nga.cn/ff14*
// @match		http*://bbs.bigccq.cn/ff14*
// @match		http*://bbs.ngacn.cc/poi*
// @match		http*://nga.178.com/poi*
// @match		http*://bbs.nga.cn/poi*
// @match		http*://bbs.bigccq.cn/poi*
// @match		http*://bbs.ngacn.cc/gta*
// @match		http*://nga.178.com/gta*
// @match		http*://bbs.nga.cn/gta*
// @match		http*://bbs.bigccq.cn/gta*
// @match		http*://bbs.ngacn.cc/sc*
// @match		http*://nga.178.com/sc*
// @match		http*://bbs.nga.cn/sc*
// @match		http*://bbs.bigccq.cn/sc*
// @match		http*://bbs.ngacn.cc/ow*
// @match		http*://nga.178.com/ow*
// @match		http*://bbs.nga.cn/ow*
// @match		http*://bbs.bigccq.cn/ow*
// @match		http*://bbs.ngacn.cc/cr*
// @match		http*://nga.178.com/cr*
// @match		http*://bbs.nga.cn/cr*
// @match		http*://bbs.bigccq.cn/cr*
// @match		http*://bbs.ngacn.cc/king*
// @match		http*://nga.178.com/king*
// @match		http*://bbs.nga.cn/king*
// @match		http*://bbs.bigccq.cn/king*
// @author      Sunness
// @namespace http://greasyfork.icu/users/63731
// ==/UserScript==

let threshold = 2400, delay = 1500, exist = true, running = false;

window.addEventListener('scroll', e => {
    if (exist && !running && (document.documentElement.scrollHeight - document.documentElement.scrollTop < threshold)) {
        running = true;
        let a = document.querySelector("a.uitxt1[title=加载下一页]");
        if (a !== null) {
            commonui.loadReadHidden(1, 2);
            setTimeout(() => { running = false; }, delay);
        } else {
            exist = false;
        }
    }
});