您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide YouTube Shorts videos with less than a certain number of likes.
// ==UserScript== // @name Hide YouTube Shorts By Likes // @namespace http://tampermonkey.net/ // @version 1.0 // @description Hide YouTube Shorts videos with less than a certain number of likes. // @author ozuromo // @match https://www.youtube.com/* // @license MIT // @grant none // ==/UserScript== (function() { 'use strict'; const likesToSkip = 10000; // Function to hide YouTube Shorts function hideShortVideos() { var videoElements = document.querySelectorAll('ytd-reel-video-renderer'); for (var i = 0; i < videoElements.length; i++) { var videoElement = videoElements[i]; if (!videoElement.isActive) { continue; } var likes = videoElement.data.reelPlayerOverlayRenderer.likeButton.likeButtonRenderer.likeCount; console.log(likes); if (likes >= likesToSkip) { continue; } videoElements[i+1].scrollIntoView(); videoElement.remove(); console.log('Short Skipped'); break; } } new MutationObserver(() => setTimeout(hideShortVideos, 50)).observe( document.querySelector('title'), { childList: true } ); })();