File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// @name Kill Baidu AD
33// @name :zh-CN 百度广告(首尾推广及右侧广告)清理
44// @namespace hoothin
5- // @version 0.6
5+ // @version 0.7
66// @description Just Kill Baidu AD
77// @description :zh-CN 彻底清理百度搜索(www.baidu.com)结果首尾的推广广告、二次顽固广告与右侧广告,并防止反复
88// @author hoothin
2323 'use strict' ;
2424 var MutationObserver = window . MutationObserver || window . WebKitMutationObserver || window . MozMutationObserver ;
2525 var observer = new MutationObserver ( function ( records ) {
26- delMobileAD ( ) ;
2726 clearAD ( ) ;
2827 } ) ;
2928 var option = {
3231 } ;
3332 observer . observe ( document . body , option ) ;
3433
35- delMobileAD ( ) ;
36-
37- function delMobileAD ( ) {
38- var mAds = document . querySelectorAll ( ".ec_wise_ad,.ec_youxuan_card" ) ;
39- for ( var i = 0 ; i < mAds . length ; i ++ ) {
34+ function clearAD ( ) {
35+ var mAds = document . querySelectorAll ( ".ec_wise_ad,.ec_youxuan_card" ) , i ;
36+ for ( i = 0 ; i < mAds . length ; i ++ ) {
4037 var mAd = mAds [ i ] ;
4138 mAd . remove ( ) ;
4239 }
43- }
44-
45- function clearAD ( ) {
46- var list = document . body . querySelectorAll ( "#content_left>div,#content_left>table" ) , i ;
40+ var list = document . body . querySelectorAll ( "#content_left>div,#content_left>table" ) ;
4741 for ( i = 0 ; i < list . length ; i ++ ) {
4842 let item = list [ i ] ;
4943 let s = item . getAttribute ( "style" ) ;
You can’t perform that action at this time.
0 commit comments