您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto-switch to latest tweets for Twitter
// ==UserScript== // @name Always Latest Tweets for Twitter // @namespace https://github.com/gslin/always-latest-tweets-for-twitter // @version 0.20240519.0 // @description Auto-switch to latest tweets for Twitter // @author Gea-Suan Lin <[email protected]> // @match https://mobile.twitter.com/* // @match https://twitter.com/* // @match https://x.com/* // @grant none // @run-at document-start // @license MIT // ==/UserScript== (function() { 'use strict'; let ob = new window.MutationObserver(ml => { // Only /home is processed. if (!document.location.pathname.match(/^\/home/)) { return; } // If it's already in "Following" timeline, uninstall the observer. if (document.querySelector('nav[role="navigation"] div[role="presentation"]:nth-child(2) a[aria-selected="true"]')) { console.debug('Already on following timeline.'); ob.disconnect(); } ml.forEach(el => { const tab = document.querySelector('nav[role="navigation"] div[role="presentation"]:nth-child(2) a[aria-selected="false"]'); if (tab) { tab.click(); } }); }); ob.observe(document, { childList: true, subtree: true, }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址