您需要先安装一个扩展,例如 篡改猴、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.21 // @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 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); const smallViewYoutubeThumbEls = smallViewMetadata.map((el) => el.closest('ytd-rich-item-renderer')); if (smallViewYoutubeThumbEls.length === 0) { return false; } smallViewYoutubeThumbEls.forEach((el) => el.remove()); return true; } const interval = setInterval(() => { removeSmallViews(); }, 1000); })();