您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the number 0 for the Reply, Repost and Like buttons.
当前为
// ==UserScript== // @name Bluesky - Remove Zeroes from Buttons // @version 23.10.20 // @description Hides the number 0 for the Reply, Repost and Like buttons. // @namespace https://greasyfork.org/en/users/253-lednerg // @license (CC) Attribution Non-Commercial Share Alike; http://creativecommons.org/licenses/by-nc-sa/3.0/ // @include *://bsky.app/* // @grant GM_addStyle // ==/UserScript== // For Replies and Likes, we're able to just use simple CSS to detect and hide zeroes. GM_addStyle(` button[aria-label="Reply (0 replies)"] div, button[aria-label="Like (0 likes)"] div { opacity: 0 !important; } `); // For Reposts, we have to use a little JavaScript. function hideZeroReposts() { const repostCounts = document.querySelectorAll('[data-testid="repostCount"]'); repostCounts.forEach((element) => { if (element.textContent.trim() === "0") { element.style.opacity = "0"; } }); } // Run the function initially hideZeroReposts(); // Run the function when the DOM changes const observer = new MutationObserver(hideZeroReposts); observer.observe(document.body, { childList: true, subtree: true });