Apple新闻类网站去除广告

Apple新闻类网站去除广告,9to5mac

目前为 2023-01-29 提交的版本。查看 最新版本

// ==UserScript==
// @name            Apple新闻类网站去除广告
// @name:en         Apple News website ad removal
// @namespace       https://banmiya.com/userscirpt/applenewsadremove
// @version         1.0.1
// @description     Apple新闻类网站去除广告,9to5mac
// @description:en  Apple News website to remove ads, 9to5mac
// @author          Zhoumin Lu
// @match           https://9to5mac.com/*
// @icon            none
// @grant           none
// @require         https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    var url = location.href
    if(url.includes("https://9to5mac.com/")){
        // 9to5mac
        window.removeAdByZmlu = function() {
            $(".ad-container").hide();
            $(".adsense").hide();
            $(".adsbygoogle").hide();
            $(".google-news-link").hide();
            $(".ad-disclaimer-container").hide();
            $(".google-auto-placed").hide();
            $("div[data-spotim-module='pitc']").hide();
        };
    }

    window.removeAdByZmlu();

    var targetNode = document.getElementById('content');
    var config = { attributes: true, childList: true, subtree: true };
    var callback = function(mutationsList) {
        window.removeAdByZmlu();
    };
    var observer = new MutationObserver(callback);
    observer.observe(targetNode, config);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址