您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove posts from tweetdeck timelines that have already been liked/retweeted
// ==UserScript== // @name Hide Tweetdeck Interacted Tweets // @description Remove posts from tweetdeck timelines that have already been liked/retweeted // @namespace https://github.com/alexwh // @version 1.0 // @match https://tweetdeck.twitter.com/* // ==/UserScript== (function() { 'use strict'; const opts = {childList: true, subtree: true}; const appObserver = new MutationObserver(mutations => { mutations.forEach((mutation) => { if (mutation.oldValue.includes("is-hidden") && !mutation.target.className.includes("is-hidden")) { for (let column of document.querySelectorAll(`section.column`)) { // don't hide stuff in the notifications column if (column.querySelectorAll(`i.icon-notifications`).length < 1) { //console.log("observing", column); tweetObserver.observe(column, opts); } } // for e.g. user tweet modals containing chirp-containers tweetObserver.observe(document.querySelector(`div#open-modal`), opts); // don't set up more than once appObserver.disconnect(); } }); }); const tweetObserver = new MutationObserver(mutations => { mutations.forEach((mutation) => { if (mutation.target.className.includes("chirp-container") && mutation.addedNodes.length > 0) { for (let tweet of mutation.addedNodes) { // liked or retweeted if (tweet.querySelectorAll(`i.js-icon-favorite.icon-heart-filled, i.js-icon-retweet.icon-retweet-filled`).length > 0) { tweet.style.display = "none"; //console.log("rm", tweet); } } } }); }); // wait for app (and columns) to load before observing them appObserver.observe(document.querySelector(`div.application`), {attributeFilter: ["class"], attributeOldValue: true}); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址