-
Star
(1,882)
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.
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 |
Glad to hear it.
As far as the limit is concerned, it does exist within Twitter, which is a bit impractical...
As soon as I have a bit of time I'll start converting the Firefox extension. For the moment, simply transferring from one to the other doesn't work and will require a few adjustments.
Mozilla just approved the plugin https://addons.mozilla.org/fr/firefox/addon/chirp-silencer/
Need some tests because I had to change some key elements in it...
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);});})();
I can confirm this works on chrome! I I do recall getting caught up with a maximum number of words I could mute which is unfortunate. For now I finished adding my list manually, but I just thought I'd mention this to you and hope it looks for duplicates. Hope it works for Firefox eventually