Skip to content

Instantly share code, notes, and snippets.

@ifvictr
Last active August 19, 2023 07:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifvictr/1fe0cf8b4f901183535ca51343c5c05b to your computer and use it in GitHub Desktop.
Save ifvictr/1fe0cf8b4f901183535ca51343c5c05b to your computer and use it in GitHub Desktop.
A userstyle that removes all view counts from Twitter
/* Remove view count from tweets with loaded view count */
div[role="group"] div:has(> a[href^="/"][href$="/analytics"][role="link"]),
/* Remove view count from tweets with unloaded view count */
div[role="group"] div:has(> [aria-label$="View post analytics"]),
/* Remove view count from the metrics row under expanded tweets */
div[role="group"] div:has(> div > a[href^="/"][href$="/analytics"][role="link"]):not(:only-child),
/* Remove the metrics row from expanded tweets if it only contains the view count */
div[role="group"]:has(> div > div:only-child > div > a[href^="/"][href$="/analytics"][role="link"]) {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment