您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide replies and retweets in your X.com (Twitter) home timeline.
当前为
// ==UserScript== // @name Hide Replies and Retweets from Timeline on X.com // @namespace http://tampermonkey.net/ // @version 1.1 // @description Hide replies and retweets in your X.com (Twitter) home timeline. // @author // @match https://x.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; /** * Function to hide reply tweets and retweets from the home timeline. */ function hideRepliesAndRetweets() { // Select all tweets in the timeline const tweets = document.querySelectorAll('div[data-testid="cellInnerDiv"]'); tweets.forEach((tweet) => { // Check if the tweet is a reply const isReply = tweet.querySelector('div[aria-label="Replying to"]') !== null; // Check if the tweet is a retweet const isRetweet = tweet.querySelector('svg[aria-label="Retweeted"]') !== null || tweet.innerText.includes('Retweeted'); if (isReply || isRetweet) { // Hide the tweet if it's a reply or retweet tweet.style.display = 'none'; } }); } // Run the function once the DOM content is loaded document.addEventListener('DOMContentLoaded', hideRepliesAndRetweets); // Observe changes to the timeline to hide new replies and retweets const observer = new MutationObserver(hideRepliesAndRetweets); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址