Last active
April 25, 2022 12:38
-
-
Save rohieb/5df57de7625e0a2182f364b3c2b88599 to your computer and use it in GitHub Desktop.
Twitter Timeline Declutter user script
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
// ==UserScript== | |
// @name Twitter Timeline Declutter | |
// @namespace http://twitter.com/ | |
// @version 2 | |
// @description Remove "Who to Follow", "While you were away", "You might like" etc. from your timeline stream | |
// @author rohieb | |
// @homepage https://gist.github.com/rohieb/5df57de7625e0a2182f364b3c2b88599 | |
// @updateURL https://gist.githubusercontent.com/rohieb/5df57de7625e0a2182f364b3c2b88599/raw | |
// @match *://twitter.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
function hideItems(n) { | |
style = n + " { display:none !important; }"; | |
console.log(style); | |
GM_addStyle(style); | |
} | |
hideItems(".WtfLargeCarouselStreamItem"); // "who to follow" | |
hideItems(".has-recap"); // "while you were away" and "you might like" | |
hideItems(".PromptbirdPrompt-streamItem"); // "Make a Moment" etc. | |
hideItems("div[data-component-context='suggest_activity_tweet']"); // "XYZ liked…" | |
hideItems(".promoted-tweet"); | |
hideItems(".js-activity-generic"); // "XYZ liked/retweeted…" in notifications | |
//hideItems(".Trends"); // for testing |
I haven't been using Twitter for a long time, feel free to fork and adapt it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After installing the script on twitter.com/home, "Who to follow" blocks appeared.
Mozilla Firefox 99.0.1 (64-bit), Tampermonkey 4.16.6160 (6 April 2022).