Blocking 'Similar' and 'Because you like ...' suggestions on reddit with uBlock Origin
Since reddit attempted to destroy all goodwill in the community with their changes to the API, I've been using the mobile web view, rather than their crappy mobile app.
(I did stop using reddit a lot, especially around the API changes, but unfortunately still use it a little, and moreso after leaving Twitter)
Recently, I've noticed that they've been "pushing" more recommended subreddits / posts like so:
(This is a bad example, as it is actually a subreddit I'm interested in, and I have found some interesting subreddits through this, but that's beside the point right now)
More heinous are posts like this, i.e. this random one from /r/blackpool
:
So, I set about seeing how I'd be able to get the trusty uBlock Origin to do this for me.
These - unfortunately- don't appear with a CSS class i.e. .display-annoying-suggestion-to-user
, so I found that I needed to work based on the text that's shown, and then use :upward
to find the parent and delete it, which results in:
###-post-rtjson-content > p:has-text('Because '):upward(article)
###-post-rtjson-content > p:has-text('Similar to '):upward(article)
###-post-rtjson-content > p:has-text('Popular on Reddit'):upward(article)
###-post-rtjson-content > p:has-text('Popular near you'):upward(article)
This is based on this StackOverflow question and this reddit post.