您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide retweets on your Twitter home page, only show tweets from the people you follow in chronological order from newest to oldest
// ==UserScript== // @name Hide retweets on your Twitter home page // @namespace https://twitter.com/home // @version 001 // @description Hide retweets on your Twitter home page, only show tweets from the people you follow in chronological order from newest to oldest // @match https://twitter.com/home // @grant none // @copyright Personal // ==/UserScript== (function() { 'use strict'; // Function to check and hide posts function checkAndHidePosts() { // Get all posts let posts = document.querySelectorAll('[data-testid="tweet"]'); // Loop through each post for (let post of posts) { // Check if the post is a retweet if (post.querySelector('[aria-label="Retweeted"]')) { // If it's a retweet, hide the post post.style.display = 'none'; } } } // Call the check and hide posts function every 2 seconds setInterval(checkAndHidePosts, 2000); })();