您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the annoying Sign Out Button from YouTube
// ==UserScript== // @name Hide YouTube Sign Out Button // @namespace https://youtube.com/ // @version 1 // @description Hides the annoying Sign Out Button from YouTube // @author Blumsie // @match https://www.youtube.com/* // @grant none // ==/UserScript== (function() { 'use strict'; const hideLogout = () => { const logoutItems = Array.from(document.querySelectorAll('ytd-compact-link-renderer, ytd-menu-service-item-renderer')) .filter(el => { const data = el.__data || el.data || {}; if (data.serviceEndpoint && data.serviceEndpoint.logoutEndpoint) return true; const urlMatch = el.innerHTML.includes('/logout') || el.innerHTML.includes('LogoutEndpoint'); return urlMatch; }); logoutItems.forEach(el => { el.style.display = 'none'; }); }; const observer = new MutationObserver(hideLogout); observer.observe(document.body, { childList: true, subtree: true }); hideLogout(); })();