// ==UserScript== // @name 移除cnBeta文章底部的红框 // @namespace http://tampermonkey.net/ // @version 0.71 // @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 // @downloadURL 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') ) { $('.fc-ab-root i.fc-close-icon').click(); } if ( $('.fc-ab-root').length == 0 ) { // make the code easy to read for all people clearInterval(t); } }, 100); }();