Greasy Fork

Greasy Fork is available in English.

移除cnBeta文章底部的红框和弹窗

移除cnBeta文章底部的反adblock红框, 移除弹窗

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         移除cnBeta文章底部的红框和弹窗
// @namespace    http://tampermonkey.net/
// @version      0.73
// @description  移除cnBeta文章底部的反adblock红框, 移除弹窗
// @author       You
// @match        https://*.cnbeta.com/*
// @match        https://*.cnbeta.com.tw/*
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @grant        none
// ==/UserScript==

!function(){"use strict";
    $("#abd-ad-iframe-wrapper").remove();
    var e=0;e=setInterval(function(){
        let t,a=!1;0!==(t=$("a[href='//www.cnbeta.com/articles/3.htm']").parents().eq(2)).length&&(t.remove(),a=!0),a&&(clearInterval(e),$("body").css("padding-bottom","0"))
    },100);//I can't remember what is the original code
    //Then create another setInterval to make the function working
    var t=0;
    t=setInterval(function () {
        if ( $('.fc-ab-root i.fc-close-icon').length != 0 ) {
            $('.fc-ab-root i.fc-close-icon').click();
            var clicked = true;
        }
        if ( $('.fc-ab-root').length == 0 && clicked ) { // make the code easy to read for all people
            clearInterval(t);
        }
    }, 100);
}();