Contents

Clean Up Twitter UI

Contents

There are annoying twitter feeds I don’t like. These are:

  1. Promoted Tweets

  2. You Might Like

  3. Who to Follow

  4. What’s Happening

  5. More Tweets

  6. Explore Tab

Using uBlock Origine, this can be done with the below filters:

! Title: CleanYourTwitter
! Dev: robonxt
! Description: Adblock filters for Twitter. Removes Promoted Tweets, You Might Like, Who to Follow, What's Happening, and other annoyances.
! Homepage: https://github.com/robonxt/CleanYourTwitter
! Last updated: July 06, 2021

! How to use: https://github.com/gorhill/uBlock/wiki/Filter-lists-from-around-the-web

! Credits: A BIG THANK YOU to https://github.com/krisu5/ and the r/uBlockOrigin reddit community for doing the initial hard work on the different Twitter filters!

! removes "promoted tweets (ads)". thanks to reddit.
twitter.com##[data-testid="tweet"]:has-text(/Promoted|Gesponsert|Реклама/)
!twitter.com##[data-focusable="true"]:has-text(/Promoted|Gesponsert|Реклама/)
!twitter.com##[data-focusable="false"]:has-text(/Promoted|Gesponsert|Реклама/)

! removes the "who to follow" section. thanks to reddit.
twitter.com##div[aria-label$="Tweets"] [data-testid="UserCell"]
twitter.com##div[aria-label$="Your Home Timeline"] [data-testid="UserCell"]
twitter.com##div[aria-label$="Retweeted"] [data-testid="UserCell"]
twitter.com##div[aria-label^="Timeline"] div [role="heading"]:has-text(Who to follow)
twitter.com##div[aria-label^="Timeline"] [href^="/i/related_users"]
twitter.com##div[aria-label^="Timeline"]  > div > div :has-text(Who to follow)
twitter.com##div[data-testid="sidebarColumn"] aside[role="complementary"][aria-label="Who to follow"] div:nth-ancestor(2)
twitter.com##div[aria-label="Timeline: Trending now"]
twitter.com##aside[aria-label="Who to follow"]

! removes "suggestions". thanks to krisu5 (https://github.com/krisu5/)
twitter.com##body:has(div[aria-label^="Timeline: Search"]) .r-1adg3ll:has(a[href^="/search?q="][href$="&src=related_query_click"])
twitter.com##body:not(:has(div[aria-label="Timeline: Explore"])) .r-qklmqi:has(span.r-1qd0xha:has-text(/^See more about this Topic/i))
!twitter.com##div[data-testid="primaryColumn"] .css-1dbjc4n:has(div[data-testid="tweet"]) .r-qklmqi:has(div[data-testid="UserCell"])
twitter.com##div[data-testid="sidebarColumn"] .r-t23y2h:has(div[aria-label="Timeline: Trending now"])
!twitter.com##div[aria-label^="Timeline:"]:not([aria-label*="List"]) div[style^="position: absolute;"]:not(:has(article)):has(a[href^="/i/lists/"])
twitter.com##div[aria-label^="Timeline:"]:not([aria-label$="Topics"]):not([aria-label$="Explore"]) .r-1adg3ll:has(a[href^="/i/"]:has-text(/^More Topics|Show more/i)):has(:not(span:has-text(/^Show more replies/i)))
twitter.com##div[aria-label^="Timeline:"]:not([aria-label$="Topics"]) .r-qklmqi:has([aria-labelledby*="topic-not-interested-button"])
twitter.com##div[aria-label="Timeline: Explore"] div[data-testid="UserCell"]:upward(2)
!twitter.com##.r-1adg3ll:has(article[role="article"]:has-text(Promoted))
twitter.com##.r-1adg3ll:has(a[href="/i/timeline"]):has(div:matches-css(min-width: 70px))
twitter.com##.r-1adg3ll:has(div[aria-label="Timeline: Carousel"])
twitter.com##.r-qklmqi:has(h2:has(span:has-text(/^People|More replies/i)))
twitter.com##div[aria-label$="trending now" i]
!twitter.com##.r-1adg3ll:has(h2:has-text(/^Topics to follow/i))
!use the below one to fix it temp?
twitter.com##.r-1ysxnx4.r-k0dy70.r-1867qdf.r-1phboty.r-rs99b7.r-1ifxtd0.r-1udh08x 
!twitter.com##.r-1adg3ll:has(div[aria-label="Timeline: Carousel"])
twitter.com##div[aria-label^="Timeline:"]:not([aria-label$="Topics"]):not([aria-label$="Explore"]) .r-1adg3ll:has(a[href^="/i/"]:has-text(/^More Topics/i))

! removes "more tweets" (often found in a new thread). found by robonxt.
twitter.com##.r-1adg3ll:has(h2:has-text(/^More Tweets/i))

! removes "explore tab". remove this if you want to explore 😀
twitter.com##[href="/explore" i]

Note: Thanks to u/robonxt for giving us this.