Skip to content

Instantly share code, notes, and snippets.

@nerdfiles
Last active April 12, 2024 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nerdfiles/e65f46cd1f8347220c8e14c9d3f6262b to your computer and use it in GitHub Desktop.
Save nerdfiles/e65f46cd1f8347220c8e14c9d3f6262b to your computer and use it in GitHub Desktop.
twitter dot com: hide "who to follow" section among other things
/**
* @author aha
* @license wtfpl, version 2
*/
/* hide "who to follow */
div div div div div div div div div div div div div div div:has([aria-label*="Follow"]) + div,
div div div div div div div div div div div div div div div:has([aria-label*="Follow"]) {
/*outline: 2px solid gold !important;*/
display: none !important; /* might hide pfps on profiles other than yours */
}
/* hide all ads and externally linking tweets */
[aria-label*="Timeline:"] > div > div > div > div > div:nth-child(1):not(*:has([role="link"])) {
/*outline: 2px solid gold !important;*/
display: none !important;
}
/**
* @description no external links anywhere but it'll load many tweets above
* the fold and run your device hot; however, the benefit is "the" algorithm
* will seem less aggressive in clapping back at you on refreshes. #slowcomputing
*/
[data-testid="cellInnerDiv"]:has([target="_blank"]) {
outline: 2px solid gold !important;
opacity: 0 !important;
position: absolute !important;
height: 0 !important;
display: none !important;
}
/* hide "go ad free" bit */
div div div div div [data-testid="cellInnerDiv"]:has([data-testid="inlinePrompt-primaryAction"]) {
outline: 2px solid gold !important;
display: none !important;
}
/** EOF */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment