更新 'baidu/clearAd.user.js'

This commit is contained in:
502647092 2019-01-08 15:01:25 +08:00
parent 9366a63bc7
commit 928e2f8ddc

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name 百度广告去除 // @name 百度广告去除
// @namespace http://ide.yumc.pw/ // @namespace http://ide.yumc.pw/
// @version 0.0.3 // @version 0.0.5
// @description 去除百度上下推广广告 // @description 去除百度上下推广广告
// @author MiaoWoo // @author MiaoWoo
// @include http*://*.baidu.* // @include http*://*.baidu.*
@ -52,8 +52,21 @@ margin-bottom:30px;
}); });
} }
}); });
['.m', 'a span'].forEach(function (c) {
var result = $(c)
var tempCount = 0
result.each(function (index,element) {
if($(element).html() == "广告" && $(element).parent().parent().css('display')!='none'){
$(element).parent().parent().remove();
tempCount++
}
if($(element).html() == "评价" && $(element).parent().parent().parent().css('display')!='none'){
$(element).parent().parent().remove();
tempCount++
}
});
showCount(tempCount);
})
} }
setInterval(function () { setInterval(clear, 500);
clear();
},500);
})(); })();