Last active
November 9, 2023 10:30
-
-
Save simonuvarov/964885871217538c2066078b573c8125 to your computer and use it in GitHub Desktop.
CSS rules to remove clutter from Twitter UI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Navigation items I don't use */ | |
div[aria-label="Trending"], | |
a[href="/i/articles"], | |
a[href="/simonuvarov/communities"], | |
a[href="/i/verified-orgs-signup"] | |
{ | |
display: none; | |
} | |
/* Twitter logo */ | |
h1[role="heading"] { | |
display: none; | |
} | |
/* Messages drawer */ | |
div[data-testid="DMDrawer"] { | |
display: none; | |
} | |
/* Remove promoted posts */ | |
[data-testid="placementTracking"] article { | |
display: none; | |
} | |
/* aria-label*="view" selects the toolbar with buttons */ | |
/* Hide reply counter */ | |
div[aria-label*="view"] > div:nth-of-type(1) > div > div > div:nth-of-type(2) { | |
display: none; | |
} | |
/* Hide retween counter */ | |
div[aria-label*="view"] > div:nth-of-type(2) > div > div > div:nth-of-type(2) { | |
display: none; | |
} | |
/* Hide like counter */ | |
div[aria-label*="view"] > div:nth-of-type(3) > div > div > div:nth-of-type(2) { | |
display: none; | |
} | |
/* Hide view counters completely */ | |
div[aria-label*="view"] > div:nth-of-type(4) { | |
display: none; | |
} | |
/* TODO: comeup with an easier selector for the view number for an open tweet */ | |
article[data-testid="tweet"] > div > div > div:nth-child(3) > div > div > div > div > div > span { | |
display: none; | |
} | |
/* Adjust the padding of the bookmark button */ | |
div[aria-label*="view"] > div:nth-of-type(5) { | |
margin: 0; | |
} | |
/* Hide the share button */ | |
div[aria-label*="view"] > div:nth-of-type(6) { | |
display: none !important; | |
} | |
/* Hide the Similar Posts button */ | |
[data-testid=show-similar-posts-pivot] { | |
display: none; | |
} | |
/* Hide the Subscribe button */ | |
[aria-label^=Subscribe] { | |
display: none; | |
} | |
/* Hide See new posts button */ | |
[role="status"] { | |
display: none; | |
} | |
/* Hide verified account label */ | |
[aria-label="Verified account"] { | |
display: none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment