How to use uBlock Origin to block just the page stackexchange.com without blocking the entire stackexchange network?

3

I've found HNQ are really distracting to me, so I want to block them. This question has some ways to block them in the sidebar, but the same list exists over at https://stackexchange.com/. I want to block that page, without blocking all of the rest of stackexchange. I currently am using

|https://stackexchange.com^

but that presents a page where I can click-through to access it: I'd rather have it load but present a blank page. I do this for reddit using

reddit.com##body

but using a similar filter for stackexchange blocks, for example, all of tex.stackexchange.com. I suppose I could add an exception filter for every possible subdomain, but there are currently a bit over a hundred and growing, so there has to be a better way. I tried

~stackexchange.com##body

which seems like it should work according to the AdBlock Plus filter cheatsheet which is supposedly supported by uBlock Origin, but that doesn't block anything.

I tried the filters given in this similar question about youtube, but they have the same issues as my current best filter. How can I filter the body element of stackexchange.com without blocking subdomains?

Gavin S. Yancey

Posted 2018-11-10T17:58:19.973

Reputation: 198

1This is not a duplicate of the linked question, because that focuses on blocking HNQ in the sidebar, whereas I'm focused on blocking the HNQ page at stackexchange.com. – Gavin S. Yancey – 2018-11-11T16:15:02.220

It isn't clear what problem you're trying to solve. Why go to a web page and look at a blank page rather than simply not go to that web page? – fixer1234 – 2018-11-12T01:45:21.037

@fixer1234 I find I'm easily distractable and one of the ways I tend to distract myself is by pulling up the webpage and browsing through the list of hot questions. I want the list to show a blank page as a reminder that This Is Not A Good Use Of My Time. – Gavin S. Yancey – 2018-11-12T02:51:12.383

Note: I would be happy with any solution that blocks the HNQ list from that page; I can't find a clear selector to use to do that. – Gavin S. Yancey – 2018-11-12T16:41:24.980

Answers

5

This answer attempts to block Hot Network Questions (HNQ) only on Stack Exchange (SE) homepage (as per OP's comment).

The HNQ on SE Homepage is inside a div with question-list ID, thus the needed filter is stackexchange.com###question-list.

This filter will only block HNQ on SE homepage. It won't block SE Realtime Questions (the parent container is main-area, which is shared with HNQ list) nor any question lists on other sites (they use div with question-mini-list ID on their homepage and questions on their Questions list)

Andrew T.

Posted 2018-11-10T17:58:19.973

Reputation: 211