Greasy Fork is available in English.

启用NGA快速爬楼模式

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

От 25.07.2019. Виж последната версия.

// ==UserScript==
// @name         启用NGA快速爬楼模式
// @namespace    https://yuyuyzl.github.io/
// @version      0.1
// @description  在进入页面时自动往前展开到显示10页,之后按点赞过滤0赞水楼
// @author       yuyuyzl
// @require      https://code.jquery.com/jquery-3.4.0.min.js
// @match        http://nga.178.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();
            console.log("[NGA FastClimb] Filter Finished")
        }
    },100);
})();