Blocking 'Similar' and 'Because you like ...' suggestions on reddit with uBlock Origin

Featured image for sharing metadata for article

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:

A screenshot of a post in the reddit home feed, showing a suggestion for /r/raimimemes because it's "similar to /r/BatmanArkham", and a somewhat funny meme

(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:

A screenshot of a post in the reddit home feed, showing a suggestion for /r/blackpool because it's allegedly "popular near you", despite the fact that I'm in Nottingham, and reddit is likely very aware of that and the fact Blackpool is 3 hours away

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.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #reddit #ublock-origin.

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.