您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically clicks the 'Latest' button on Bluesky hashtag pages
// ==UserScript== // @name Bluesky Hashtag Page Auto-Click Latest Button // @namespace http://tampermonkey.net/ // @version 0.1 // @description Automatically clicks the 'Latest' button on Bluesky hashtag pages // @author Claude 3.5 Sonnet // @match https://bsky.app/hashtag/* // @match https://bsky.app/search?q* // @license MIT // @grant none // ==/UserScript== // Written with prompting instructions from Lauren @lauren1701.bsky.social (function() { 'use strict'; // Function to check and click the 'Latest' button function clickLatestButton() { // Select the 'Latest' tab button const latestButton = document.querySelector('div[role="tablist"] div[role="tab"]:nth-child(2)'); if (latestButton) { // If the 'Latest' button is found and not already selected, click it if (!latestButton.querySelector('[style*="border-bottom-color: rgb(16, 131, 254)"]')) { latestButton.click(); console.log('Clicked Latest button'); } } } // Use a MutationObserver to watch for changes in the page const observer = new MutationObserver((mutations) => { for (const mutation of mutations) { if (mutation.type === 'childList') { clickLatestButton(); } } }); // Start observing the page with the following configuration observer.observe(document.body, { childList: true, subtree: true }); // Initial check in case the button is already present clickLatestButton(); })();