Skip to content

Instantly share code, notes, and snippets.

@keithjgrant
Last active August 31, 2023 20:48
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithjgrant/8ab9d633f321abeed28ffb01617609b0 to your computer and use it in GitHub Desktop.
Save keithjgrant/8ab9d633f321abeed28ffb01617609b0 to your computer and use it in GitHub Desktop.
Adblock plus filters to remove the crap from twitter
twitter.com##.module.trends
twitter.com##.wtf-module
twitter.com##[data-component-context="suggest_activity_tweet"]
twitter.com##.nav>.moments
twitter.com##.LiveVideoHomePageModuleContainer
@keithjgrant
Copy link
Author

keithjgrant commented Aug 10, 2017

Purpose, by line number:

  1. Remove trending words/hashtags
  2. Remove Who To Follow box
  3. Remove "Bob liked this" tweets
  4. Remove "Moments" tab
  5. Hide live video nonsense in the top right

@keithjgrant
Copy link
Author

For the new twitter:

twitter.com##[aria-label*="Trending"]
twitter.com##[aria-label*="Who to follow"]
twitter.com##a[href="/explore"]

@mslabo102
Copy link

mslabo102 commented Nov 21, 2020

Twitter changed its code recently and now the blacklist doesn't work, it showed me a cruise ship sank with millions of children dead. I can't use Twitter anymore.

@mslabo102
Copy link

They changed it yet again. Now COVID will flood our twitter even if we aren't looking for it.

@tueksta
Copy link

tueksta commented Sep 21, 2021

I'm doing something like this

twitter.com##[aria-label*="Set as not interested"]:xpath(../../../../../../../../../../../../../../..)

and

twitter.com##div > div > article > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > span > span:has-text(/Follow topic/)

now, but they change it every other day, and it also breaks pagination on scrolling down a bit

@eyezick
Copy link

eyezick commented May 10, 2022

For the new twitter:

twitter.com##[aria-label*="Trending"]
twitter.com##[aria-label*="Who to follow"]
twitter.com##a[href="/explore"]

FYI for anyone reading: This syntax is working but they change aria labels, so you'd need to inspect the page to see what the current value is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment