您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove the "... posted" button that frequently pops up on on x.com
当前为
// ==UserScript== // @name Remove New Posts Button On X // @namespace https://6942020.xyz/ // @version 1.0 // @description Remove the "... posted" button that frequently pops up on on x.com // @author WadeGrimridge // @match https://x.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const timelineSelector = 'div[aria-label="Home timeline"]'; const buttonSelector = 'button[aria-label="New posts are available. Push the period key to go to the them."]'; const removeButton = () => { const timeline = document.querySelector(timelineSelector); if (timeline) { timeline.querySelectorAll(buttonSelector).forEach(button => button.remove()); } }; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', removeButton); } else { removeButton(); } const observer = new MutationObserver(removeButton); observer.observe(document.querySelector(timelineSelector) || document.body, { childList: true, subtree: true }); window.addEventListener('unload', () => observer.disconnect()); })();