您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically click 'show more replies'
- // ==UserScript==
- // @name Twitter Show All Replies
- // @namespace http://tampermonkey.net/
- // @version 0.7
- // @description Automatically click 'show more replies'
- // @author cro
- // @match https://*.twitter.com/*
- // @match https://*.x.com/*
- // @icon https://www.google.com/s2/favicons?domain=twitter.com
- // @grant none
- // @license MIT
- // ==/UserScript==
- /* jshint esversion: 6 */
- (function() {
- 'use strict';
- let path_match = new RegExp('^/.+/status/\\d+$');
- let click_show_more = function()
- {
- if (!window.location.pathname.match(path_match))
- {
- return;
- }
- let nodes = document.querySelector('main[role="main"] section')?.lastChild?.firstChild?.children;
- if (!nodes)
- {
- return;
- }
- for (let node of nodes)
- {
- if (node.querySelector('[data-testid="tweet"]'))
- {
- continue;
- }
- node.querySelector('[role="button"]')?.click()
- }
- };
- setInterval(click_show_more, 500);
- })();