Last active
April 14, 2025 16:31
-
Star
(1,881)
You must be signed in to star a gist -
Fork
(83)
You must be signed in to fork a gist
-
-
Save IanColdwater/88b3341a7c4c0cf71c73ac56f9bd36ec to your computer and use it in GitHub Desktop.
Here are some terms to mute on Twitter to clean your timeline up a bit.
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet | |
suggest_grouped_tweet_hashtag | |
suggest_pyle_tweet | |
suggest_ranked_organic_tweet | |
suggest_ranked_timeline_tweet | |
suggest_recap | |
suggest_recycled_tweet | |
suggest_recycled_tweet_inline | |
suggest_sc_tweet | |
suggest_timeline_tweet | |
suggest_who_to_follow | |
suggestactivitytweet | |
suggestpyletweet | |
suggestrecycledtweet_inline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This bookmarklet prompts for a comma-delimited list of terms (including phrases), scrapes existing terms to avoid duplicate errors, and offers the full updated list in an "I'm done" message. Play with the delay.
javascript:(function(){const delayMs=500;let input=prompt("Enter comma-separated muted keywords:");if(!input)return;const keywords=input.split(",").map(s=>s.trim()).filter(Boolean);const nativeInputValueSetter=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;function getMutedKeywords(){let arr=[];document.querySelectorAll("section[aria-label='Section details'] div[role='link']").forEach(el=>{let span=el.querySelector("div[dir='ltr'] span");span&&arr.push(span.textContent.trim().toLowerCase());});return arr;}function addMutedKeyword(kw){const inp=document.querySelector("[name='keyword']");nativeInputValueSetter.call(inp,kw);inp.dispatchEvent(new Event("input",{bubbles:true}));document.querySelector("[data-testid='settingsDetailSave']").click();}const delay=()=>new Promise(r=>setTimeout(r,delayMs));keywords.reduce(async(prev,kw)=>{await prev;let existing=getMutedKeywords();if(existing.includes(kw.toLowerCase())){console.log("Skipping duplicate:",kw);return Promise.resolve();}let addButton=document.querySelector("a[href='/settings/add_muted_keyword']");if(!addButton){console.error("Add muted keyword button not found, skipping keyword:",kw);return Promise.resolve();}addButton.click();await delay();addMutedKeyword(kw);return delay();},Promise.resolve()).then(()=>alert("I'm finished.")).catch(e=>{console.error(e);alert("Finished with errors: "+e.message);});})();