Greasy Fork is available in English.
贴吧广告过滤不用登录
当前为
// ==UserScript==
// @name 贴吧广告过滤登录去除
// @namespace
// @version 0.6
// @description 贴吧广告过滤不用登录
// @author Time
// @match https://tieba.baidu.com/
// @grant none
// ==/UserScript==
(function() {
var options = {
matching : "tieba.baidu.com",
loginDom : "tiebaCustomPassLogin",
avdDom : "fengchao-wrap-feed",
};
var host = window.location.host;
if (host.indexOf(options.matching) == -1) return;
var clearLogin = function () {
var login = document.getElementById(options.loginDom);
if (login == null) return;
login.remove();
};
var clearAdvertisement = function () {
var classAdv = document.getElementsByClassName(options.avdDom);
if (classAdv.length <= 0) return;
for (var i = 0; i < classAdv.length; i++) {
classAdv[i].remove();
}
};
setInterval(function(){
clearLogin();
clearAdvertisement();
}, 300);
})();