您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes the left nav bars
// ==UserScript== // @name TwitchUnrecommend // @version 1.09081 // @description Removes the left nav bars // @match https://*.twitch.tv/* // @run-at document-end // @namespace https://greasyfork.org/users/1359318 // ==/UserScript== window.onload = function () { document.querySelectorAll(".side-nav-section").forEach(entry => { if (entry.ariaLabel !== 'Followed Channels') { entry.style.setProperty("display", "none", "important"); } }); const targetNode = document.getElementById("root"); const config = { childList: true, subtree: true }; const callback = (mutationList, observer) => { for (const mutation of mutationList) { mutation.addedNodes.forEach(entry => { if (entry.ariaLabel != null && (entry.ariaLabel === 'Recommended Channels' || entry.ariaLabel.endsWith('Viewers Also Watch'))) { entry.style.setProperty("display", "none", "important"); } }); } }; const observer = new MutationObserver(callback); observer.observe(targetNode, config); }