去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它
当前为
// ==UserScript==
// @name Fuck CSDN
// @version 1.4
// @description 去除CSDN BBS&BLOG&DOWNLOAD&WWW ADP检测/广告/展开全文限制/复制小尾巴/其它
// @author 流星暴雨
// @grant none
// @match http*://blog.csdn.net/*
// @match http*://bbs.csdn.net/*
// @match http*://download.csdn.net/*
// @match http*://www.csdn.net/*
// @run-at document-body
// @homepageURL https://greasyfork.org/scripts/374950
// @supportURL https://greasyfork.org/scripts/374950
// @namespace Eternal
// ==/UserScript==
(function () {
'use strict';
var extension = true; //如为真则开启拓展功能 去除 联系方式/赚零钱/传资源
var hook = function () {
window.setInterval_ = setInterval;
var mysetInterval = function (fun, time) {
if ((fun + '').match("check-adblock-time")) {
return null;
} else {
return setInterval_(fun, time);
}
}
setInterval = mysetInterval;
document.body.insertBefore_ = document.body.insertBefore;
var myinsertBefore = function (ele, box) {
if (ele.innerHTML.match("ADP") || ele.innerHTML.match("广告")) {
return document.body;
} else {
return document.body.insertBefore_(ele, box);
}
};
document.body.insertBefore = myinsertBefore;
}
var addTimer = function (ele, time, code) {
var i = time == -1 ? undefined : (time ? time : 10000) / 10;
var timer = setInterval(function () {
i--;
if ($(ele).size() > 0 || i < 0) {
clearInterval(timer);
setTimeout(function () {
code && eval(code);
$(ele).remove();
}, 50)
}
}, 10);
}
if (location.host.match("blog")) {
$(function () {
$("#article_content").css("height", '');
$(".hide-article-box").remove();
$(".fourth_column").remove();
$(".pulllog-box").remove();
$(".box-shadow").remove();
$(".aside-box > div[data-track-click]").parent().remove();
$(".BAIDU_DUP_fp_wrapper").remove();
$(".adsbygoogle").parent().remove();
$("#commentBox").prev().remove();
$(".recommend-ad-box").remove();
$("#adContent").remove();
$("div[id*='kp_box']").remove();
if (csdn.copyright) {
csdn.copyright.init = function () {};
}
$("img[onerror]").remove();
if (extension) {
$(".gitChat").remove();
$(".persion_article").empty();
}
});
addTimer(".right-item[class*='ads']");
addTimer("#asideFooter > .aside-box:has('iframe')");
addTimer("div[class*='box-box']:has('iframe'):contains('关闭')");
hook();
} else if (location.host.match("bbs")) {
$(function () {
$(".post_body > div[scrolling=no]").remove();
$(".bbs_feed_ad_box").remove();
$(".post_body > div").remove();
$(".pulllog-box").remove();
$("#adContent").remove();
$("div[id*='kp_box']").remove();
if (extension) {
$(".gitChat").remove();
$(".footer_box").empty();
$(".footer_box").css("visibility", "hidden");
}
addTimer(".hide_topic_box", undefined, "$('#bbs_detail_wrap').css('max-height', '')");
});
} else if (location.host.match("download")) {
$(".check-adblock-bg").parent().remove();
$(function () {
$(".dl_mar").remove();
$(".right_bottom").remove();
$(".hot_arti_list > div").remove();
$("#adContent").remove();
$("#album_detail_wrap > div:not(.dl_more)").remove();
$(".dl_edu").remove();
$("div[id*='kp_box']").remove();
if (extension) {
$(".gitChat").remove();
$(".fixed_dl").remove();
}
});
hook();
var timer = setInterval(function () {
if (document.body.insertBefore_ == undefined) {
clearInterval(timer);
document.body.insertBefore_ = document.body.insertBefore;
var myinsertBefore = function (ele, box) {
if (ele.innerHTML.match("ADP") || ele.innerHTML.match("广告")) {
return document.body;
} else {
return document.body.insertBefore_(ele, box);
}
};
document.body.insertBefore = myinsertBefore;
}
}, 10);
} else if (location.host.match("www")) {
$(function () {
$(".banner-ad-box").remove();
$(".slide-outer").remove();
$(".indexSuperise").remove();
$("div[id*='kp_box']").remove();
addTimer("#adContent");
if (extension) {
$(".gitChat").remove();
$(".persion_article").empty();
}
});
}
console.log("Fuck CSDN!")
})();