您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
It is in the name
当前为
// ==UserScript== // @name Hide 7tv theather mode button on youtube // @version 1.2 // @description It is in the name // @author equmaq // @match https://www.youtube.com/* // @grant none // @license MIT // @namespace https://greasyfork.org/users/990886 // ==/UserScript== (function() { 'use strict'; function removeElementByXpath(xpath) { const element = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; if (element) { element.remove(); } } const targetXPath = '//button[@aria-label="Theater mode"]'; const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { const addedNodes = Array.from(mutation.addedNodes); addedNodes.forEach((node) => { if (node.matches(targetXPath)) { removeElementByXpath(targetXPath); } }); }); }); observer.observe(document.documentElement, { childList: true, subtree: true }); })();