顺手给大家个油猴脚本,秒去除,这下干净了!
[ttreply]
// ==UserScript==
// @name 自动移除指定广告元素
// @namespace http://tampermonkey.net/
// @version 1.1
// @description 移除页面中特定class的广告div,根据你提供的HTML代码定制
// @author 一条大辉狼
// @match *://*/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
div.ripro_gg_wrap.pc { display: none !important; }
`);
function removeAds() {
let targetDiv = document.querySelector('div.ripro_gg_wrap.pc');
if (targetDiv) {
targetDiv.remove();
console.log('已成功移除目标广告元素');
}
}
window.addEventListener('load', function() {
removeAds();
});
window.addEventListener('DOMContentLoaded', function() {
removeAds();
new MutationObserver(removeAds).observe(document.body, {
childList: true,
subtree: true
});
});
})();
[/ttreply]
上一篇:
好消息,B站不用满100也可以提现了下一篇:
PS1恐龙危机1汉化了,好玩吗?