Greasy Fork 支持简体中文。

Hide retweets on your Twitter home page

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);
})();