Irish Gamers Community

Hello! Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Tech Tip Remove Promoted Posts From Reddit

Dermot

Administrator
Staff member
Messages
319
Age
41
Location
Ireland
This post will show you how to remove promoted posts from showing on Reddit.

You will need a Userscript Plugin/Addon/Extension for your Web Browser, Some are linked below for your convenience.

Chrome based Browsers: TamperMonkey ViolentMonkey
Firefox based Browsers: GreaseMonkey TamperMonkey ViolentMonkey

When you install these on your browser, you will get the chance to add your own Userscripts.

Add the following Userscript to remove the promoted posts on Reddit.

Userscript to remove Reddit Promoted Posts:
// ==UserScript==
// @name         Kill Promoted Reddit Posts
// @namespace    http://reddit.com/
// @version      1.0
// @description  Remove Promoted Reddit Posts
// @author       D
// @match        https://www.reddit.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const promotedPosts = document.getElementsByClassName('promotedlink');
    let totalPosts = 0;

    const hidePromotedPosts = () => {
        if (promotedPosts.length === totalPosts) return;
        totalPosts = promotedPosts.length;
        Array.from(promotedPosts).forEach((post) => {
            post.style.display = 'none';
        });
    };

    hidePromotedPosts();
    document.body.addEventListener('DOMNodeInserted', hidePromotedPosts);
})();
When added, Make sure to go to File -> Save to save the script and then just refresh Reddit page to enable script.

Any questions, Ask below.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Videos

Reviews

 Past Streams

Top