Warning: fopen(/www/sites/update.greasyfork.icu/index/store/forever/ab00874b7bf38f0e1171ecf4b2ead851.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript==
// @name Kill Baidu AD
// @name:zh-CN 百度广告(首尾推广及右侧广告)清理
// @namespace hoothin
// @version 0.81
// @description Just Kill Baidu AD
// @description:zh-CN 彻底清理百度搜索(www.baidu.com)结果首尾的推广广告、二次顽固广告与右侧广告,并防止反复
// @author hoothin
// @include http*://www.baidu.com/*
// @include http*://m.baidu.com/*
// @grant none
// @run-at document-body
// @license MIT License
// @compatible chrome 测试通过
// @compatible firefox 测试通过
// @compatible opera 未测试
// @compatible safari 未测试
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rixixi@sina.com&item_name=Greasy+Fork+donation
// @contributionAmount 1
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(function(records){
clearAD();
});
var option = {
'childList': true,
'subtree': true
};
observer.observe(document.body, option);
function clearAD(){
var mAds=document.querySelectorAll(".ec_wise_ad,.ec_youxuan_card"),i;
for(i=0;idiv,#content_left>table");
for(i=0;ispan");
if(span && span.innerHTML=="广告"){
item.remove();
}
[].every.call(item.querySelectorAll("a>span"),function(span){
if(span && (span.innerHTML=="广告" || span.getAttribute("data-tuiguang"))){
item.remove();
return false;
}
return true;
});
}
}
var eb = document.querySelectorAll("#content_right>table>tbody>tr>td>div");
for(i=0;i