520的详情页广告有点烦人啊

六级用户 一条大辉狼 2小时前 417

顺手给大家个油猴脚本,秒去除,这下干净了!






[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汉化了,好玩吗?
热门回复
  • 四级用户 vimac 2小时前
    3

    adguard 里面加条用户规则即可:

    gamer520.com##article.article-content div.ripro_gg_wrap.pc:first-child > a:first-child

    • 老男人游戏网配套论坛
      5
        立即登录 立即注册
最新回复 (3)
  • 四级用户 vimac 2小时前
    3 2

    adguard 里面加条用户规则即可:

    gamer520.com##article.article-content div.ripro_gg_wrap.pc:first-child > a:first-child

  • 五级用户 Ludens 2小时前
    2 3
    我有时候还帮他们点一点,毕竟现在又不要登录东西又全,良心网站不多了
  • 六级用户 一条大辉狼 2小时前
    0 4
    vimac adguard 里面加条用户规则即可:gamer520.com##article.article-content div.ripro_gg_wrap.pc:first-child & ...
    学习了,果然更简单
    • 老男人游戏网配套论坛
      5
        立即登录 立即注册
发新帖
本论坛禁止发布SWITCH和PS4相关资源,若有其他侵权内容,请致邮3360342659#qq.com(#替换成@)删除。