(new Soapbox())->shout(array_map('strtoupper', $opinions)); //Shaun's blog


Me, elsewhere

GitHub
parseword
Miscellaneous public code

Twitter
@parseword
I don't tweet much

XMPP chat
xmpp@shaunc.com
(Pidgin, Miranda, Swift, etc.)

A Stylish recipe to block Reddit ads

Posted November 16, 2017 by shaun

Reddit has been tweaking their site layout, and they've added a big yellow block at the top of the page for logged-out visitors. In addition, even after opting out of the garish new redesign, a bright red "try the redesign" banner appears in the upper left corner of the page.

While I was in the Stylish is now spyware Stylus editor adding some new rules, I figured I'd post my ad-blocking recipe here. This should suppress much of the advertising and promoted content on Reddit's classic web interface, as well as hiding the yellow signup promo, the "Get New Reddit" button, and the "test our new profile experience" banner.

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("reddit.com") {
    div#siteTable_organic {
        display: none !important;
    }
    span#sponsored-indicator {
        display: none;
    }
    div#sponsorship {
        display: none;
    }
    div#sponsorshipbox {
        display: none;
    }
    iframe#ad_main {
        display: none;
    }
    iframe#ad_sponsorship {
        display: none;
    }
    div.ad-container {
        display: none !important;
    }
    div.native-ad-container {
        display: none !important;
    }
    div.native-sidebar-ad {
        display: none !important;
    }
    /* Yellow "Welcome to Reddit" banner */
    section.infobar.listingsignupbar {
        display: none;
    }
    /* "Get New Reddit" button */
    div.redesign-beta-optin {
        display: none !important;
    }
    a.redesign-beta-optin {
        display: none !important;
    }
    button.redesign-beta-optin {
        display: none !important;
    }
    /* "Test our new profile experience" banner */
    section.profilebetabar {
        display: none !important;
    }
}


Recent articles

📰 Generating vanity DNSSEC key tags

📰 DDoS involving forged packets from 23.225.141.70

📰 Website integrity monitoring through version control

📰 SpamAssassin 3.4.2 fixes security problems, adds HashBL and phishing plugins

📰 Bug or turf war? ICQ via Pidgin now fails with "startOSCARSession: Request Timeout"

📰 🎂

📰 SFSQuery, a PHP class to query the StopForumSpam API and DNSBL

📰 Resolving portmaster error "pkg-static: automake-1.16.1 conflicts with automake-wrapper-20131203"

📰 Resolving LibreNMS error "RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths"

📰 1.1.1.1: Fast, but not so accurate (yet)

📰 autodiscover.xml as an Indicator of Attack

📰 Blocking Facebook's Tracking and Surveillance: A Comprehensive Approach

📰 Let's Encrypt Readies for Certificate Transparency with Embedded SCTs

📰 Evaluating DNSBL Effectiveness with Postfix Logs

📰 Resolving subversion error E145001: Node has unexpectedly changed kind

▲ Back to top | Permalink to this page