您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove small view count video thumbs in the main page
// ==UserScript== // @name Youtube no below 1K // @namespace http://tampermonkey.net/ // @version 0.23 // @description Remove small view count video thumbs in the main page // @author CosmicRice // @license MIT // @match https://www.youtube.com/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @run-at document-idle // ==/UserScript== (function() { 'use strict'; const absoluteUrls = ['https://www.youtube.com', 'https://www.youtube.com/']; const partialUrls = ['https://www.youtube.com/watch?']; const removeSmallViews = () => { // Under 1K const allThumbnailMetadata = [...document.querySelectorAll('div#metadata-line > span.inline-metadata-item')]; const viewMetadata = allThumbnailMetadata.filter((d) => d.textContent.includes(' views') && !d.textContent.includes('K') && !d.textContent.includes('M') && !d.textContent.includes('B')); const smallViewMetadata = viewMetadata.filter((d) => parseInt(d.textContent.replace(' views'), 10) < 1000 || d.textContent === 'No views' || d.textContent === '1 view'); const smallViewYoutubeThumbEls = smallViewMetadata.map((el) => el.closest('ytd-rich-item-renderer') || el.closest('ytd-compact-video-renderer')).filter(el => el && el.style.display !== 'none'); if (smallViewYoutubeThumbEls.length === 0) { return false; } smallViewYoutubeThumbEls.forEach((el) => { el.style.display = 'none' }); return true; } const interval = setInterval(() => { // workaround for tampermonkey not catching youtube route change if (absoluteUrls.includes(window.location.href) || partialUrls.some(u => window.location.href.includes(u))) { removeSmallViews(); return; } }, 1000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址