Skip to content

Instantly share code, notes, and snippets.

@yogan
Last active September 30, 2024 12:10
Show Gist options
  • Save yogan/a01a799ee656abd347e418a443d9214c to your computer and use it in GitHub Desktop.
Save yogan/a01a799ee656abd347e418a443d9214c to your computer and use it in GitHub Desktop.
Less Annoying Twitter (X) User CSS
/* get rid of sticky Home + For you / Following header */
div[aria-label="Home timeline"] > div:first-of-type {
position: initial;
}
/* remove useless entries in left menu */
a[aria-label="Search and explore"],
a[aria-label="Lists"],
a[aria-label="Jobs"],
a[aria-label="Communities"],
a[aria-label="Premium"],
a[aria-label="Business"],
a[aria-label="Twitter Blue"],
a[aria-label="Verified"] {
display: none;
}
/* hide everything in the right sidebar, only keep the search box (first item) */
div[aria-label="Trending"] > div > div:not(:first-of-type) {
display: none;
}
/* "Messages" (DM) pop-up thingy on bottom right*/
div[data-testid="DMDrawer"] {
display: none;
}
/* Twitter needs no scrollbar */
::-webkit-scrollbar {
display: none;
}
/* Stuff from mcc:
https://cohost.org/mcc/post/715387-how-to-hide-the-vie */
/* Block Twitter views/analytics UI elements added in 2022 */
/* div:has(>a[href$="/analytics"]:not([role="menuitem"])) {
display: none
} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment