Skip to content

Commit 5899808

Browse files
committed
fix
1 parent 20f892d commit 5899808

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

Kill Baidu AD/Kill Baidu AD.user.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
// ==UserScript==
22
// @name Kill Baidu AD
33
// @name:zh-CN 百度广告(首尾推广及右侧广告)清理
4-
// @namespace hoothin
5-
// @version 0.3
4+
// @namespace hoothin
5+
// @version 0.5
66
// @description Just Kill Baidu AD
77
// @description:zh-CN 彻底清理百度搜索(www.baidu.com)结果首尾的推广广告、二次顽固广告与右侧广告,并防止反复
8-
// @author hoothin
9-
// @include http*://www.baidu.com/*
10-
// @grant none
11-
// @run-at document-body
12-
// @license MIT License
13-
// @compatible chrome 测试通过
14-
// @compatible firefox 测试通过
15-
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rixixi@sina.com&item_name=Greasy+Fork+donation
8+
// @author hoothin
9+
// @include http*://www.baidu.com/*
10+
// @include http*://m.baidu.com/*
11+
// @grant none
12+
// @run-at document-body
13+
// @license MIT License
14+
// @compatible chrome 测试通过
15+
// @compatible firefox 测试通过
16+
// @compatible opera 未测试
17+
// @compatible safari 未测试
18+
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=rixixi@sina.com&item_name=Greasy+Fork+donation
1619
// @contributionAmount 1
1720
// ==/UserScript==
1821

@@ -28,7 +31,11 @@
2831
};
2932
observer.observe(document.body, option);
3033

34+
var mAd=document.querySelector(".ec_wise_ad");
35+
if(mAd)mAd.parentNode.removeChild(mAd);
3136
function clearAD(){
37+
var mAd=document.querySelector(".ec_wise_ad");
38+
if(mAd)mAd.parentNode.removeChild(mAd);
3239
var list=document.body.querySelectorAll("#content_left>div,#content_left>table"),i;
3340
for(i=0;i<list.length;i++){
3441
let item = list[i];

0 commit comments

Comments
 (0)