// ==UserScript== // @name Automatically show more replies on Twitter // @namespace Violentmonkey Scripts // @match https://x.com/FatsPostingLs/status/1518605088595525634* // @grant none // @version 1.0 // @author minnieo // @description 6/1/2024, 1:49:37 AM // @license MIT // @downloadURL none // ==/UserScript== // Function to check and click the button function clickShowMoreRepliesButton() { // Find the button that contains a span with the text 'Show more replies' const buttons = document.querySelectorAll('button'); buttons.forEach(button => { const span = button.querySelector('span'); if (span && span.textContent === 'Show more replies') { button.click(); console.log('Button clicked!'); } }); } // Set up a MutationObserver to monitor changes in the DOM const observer = new MutationObserver((mutationsList, observer) => { for (let mutation of mutationsList) { if (mutation.type === 'childList' || mutation.type === 'subtree') { clickShowMoreRepliesButton(); } } }); // Start observing the entire document for changes observer.observe(document.body, { childList: true, subtree: true }); // Initial check in case the button is already present clickShowMoreRepliesButton();