您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Watched videos will be removed from subfeed
// ==UserScript== // @name YouTube - Remove Watched Videos // @version 1.0 // @description Watched videos will be removed from subfeed // @author Bobocato // @match https://www.youtube.com/* // @grant none // @namespace https://greasyfork.org/users/167089 // ==/UserScript== function deleteParents(){ console.log("Start"); let watchedBadges = document.getElementsByClassName("ytd-thumbnail-overlay-playback-status-renderer"); let parent = false; let currElement; //Get parent and remove them for (let i = 0; i < watchedBadges.length; i++){ currElement = watchedBadges[i]; while (!parent){ if(currElement.nodeName == "YTD-GRID-VIDEO-RENDERER"){ parent = true; currElement.remove(); console.log("Removed"); } else { currElement = currElement.parentElement; } } parent = false; } if(document.getElementsByClassName("ytd-thumbnail-overlay-playback-status-renderer").length > 0){ deleteParents(); } } (function() { 'use strict'; setInterval(function(){ console.log("Remove Called"); if(document.getElementsByClassName("ytd-thumbnail-overlay-playback-status-renderer").length > 0){ deleteParents(); } }, 1000); })();