您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides YT Shorts (I use this to focus better on my work)
// ==UserScript== // @name Block YouTube Shorts Completely // @namespace http://tampermonkey.net/ // @version 2.0 // @description Hides YT Shorts (I use this to focus better on my work) // @author Emree.el on instagram // @match https://www.youtube.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const removeShorts = () => { const selectors = [ 'ytd-rich-shelf-renderer:has(a[href^="/shorts"])', 'ytd-reel-shelf-renderer', 'a[href^="/shorts"]', 'ytd-grid-video-renderer:has(a[href^="/shorts"])', 'ytd-reel-item-renderer', 'ytd-video-renderer:has(a[href*="shorts"])', 'a[title="Shorts"]', // Sidebar Shorts button 'a[href="/shorts"]' // Any other direct shorts button ]; selectors.forEach(selector => { document.querySelectorAll(selector).forEach(el => el.remove()); }); }; setInterval(removeShorts, 1000); // run every second to clean up })();