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


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 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 web interface, as well as the yellow signup promo and the "try the redesign" 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;
    }
    section.infobar.listingsignupbar {
        display: none;
    }
    div.redesign-beta-optin {
        display: none !important;
    }
    a.redesign-beta-optin {
        display: none !important;
    }
}


Recent articles

📰 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

📰 Installing PHP 7.2 with pthreads on CentOS 6

📰 LocalStorage kills another site, or: Working around Zap2it's new interface

📰 A new DNS geolocation service from PowerDNS

▲ Back to top | Permalink to this page