Greasy Fork

Greasy Fork is available in English.

启用NGA快速爬楼模式

在进入页面时自动往前展开到显示10页,之后按点赞过滤0赞水楼

当前为 2020-10-25 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         启用NGA快速爬楼模式
// @namespace    https://yuyuyzl.github.io/
// @version      0.4.1
// @description  在进入页面时自动往前展开到显示10页,之后按点赞过滤0赞水楼
// @author       yuyuyzl
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/3.4.0/jquery.min.js
// @match        *://nga.178.com/read.php?tid=*&page=*
// @match        *://bbs.nga.cn/read.php?tid=*&page=*
// @match        *://bbs.ngacn.cc/read.php?tid=*&page=*
// @match        *://ngabbs.com/read.php?tid=*&page=*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    jQuery.noConflict();
    var jq=jQuery;
    var prevadd;
    jq("#pagebtop td a").each(function(i,obj){if(jq(obj).text()=="<")prevadd=obj});
    var interval=setInterval(function(){
        var pagelong=parseInt(jq("#pagebbtm td a.invert").text().replace(".",""))-parseInt(jq("#pagebtop td a.invert").text().replace(".",""));
        var toppage=parseInt(jq("#pagebtop td a.invert").text().replace(".",""));
        if(pagelong<9 && toppage!=1){
            commonui.loadReadHidden(0,4);
        }else {
            clearInterval(interval);
            jq(".small_colored_text_btn.block_txt_c2.stxt>span.white").each(function(i,obj){if (!(jq(obj).text().length>0&&parseInt(jq(obj).text())>=1)){
                jq(obj).parents(".forumbox").hide();
            }});
            jq(".avatar").hide();
            jq("#pagebtop td a").each(function(i,obj){if(jq(obj).text()=="前页"){
                jq("#pagebbtm tr").append(jq(obj).parent());
            }});
            //<td><a href="/read.php?tid=17741491&amp;page=611" class=" uitxt1" title="最后页">&nbsp;611.</a></td>
            console.log("[NGA FastClimb] Filter Finished")
        }
    },100);
})();