Reddit Promotion Blocker

Blocks all of the promoted advertisements on Reddit.

目前為 2024-04-07 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Reddit Promotion Blocker
// @namespace    http://tampermonkey.net/
// @version      0.4.2
// @description  Blocks all of the promoted advertisements on Reddit.
// @author       Aiden Charles
// @match        http://reddit.com/*
// @match        https://reddit.com/*
// @match        http://www.reddit.com/*
// @match        https://www.reddit.com/*
// @match        http://old.reddit.com/*
// @match        https://old.reddit.com/*
// @require      https://code.jquery.com/jquery-3.4.1.slim.min.js
// @grant        none
// ==/UserScript==

(function() {
    console.log("Reddit promotion blocker script is running!");

    if (window.location.hostname == "old.reddit.com") {
        setInterval(function() {
            $("span:contains('promoted')").parent().parent().parent().parent().parent().hide();
            $("div").find(".ad-container").parent().hide();
        }, 1000);
    }
    else {
        setInterval(function() {
            $("span>:contains('promoted')").parent().parent().parent().parent().parent().parent().parent().hide();
            $("div[data-before-content='advertisement']").parent().parent().parent().hide();
            $("div").find(".adsense-ad").parent().parent().hide();
        }, 1000);
    }
})();

QingJ © 2025

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