Skip to content

Instantly share code, notes, and snippets.

@rohieb
Last active April 25, 2022 12:38
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 rohieb/5df57de7625e0a2182f364b3c2b88599 to your computer and use it in GitHub Desktop.
Save rohieb/5df57de7625e0a2182f364b3c2b88599 to your computer and use it in GitHub Desktop.
Twitter Timeline Declutter user script
// ==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
@Korb
Copy link

Korb commented Apr 25, 2022

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).

@rohieb
Copy link
Author

rohieb commented Apr 25, 2022

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