您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove too short or too long videos from your YouTube's recommendation
This Tampermonkey script is designed to customize your YouTube recommendations by removing videos that are either too short or too long. It operates by scanning the videos in your YouTube recommendations and removing any that do not fall within the specified duration range.
Videos like this will be removed:
The script works by scanning the videos in your YouTube recommendations and removing any that are shorter than a specified minimum duration or longer than a specified maximum duration. By default, these durations are set to remove videos shorter than 1 minute and longer than 1 hour(by default max duration is disabled), but these can be easily adjusted to suit your preferences.
To adjust the duration thresholds, you need to modify the values of minDuration
and/or maxDuration
in the script. For instance, if you want to remove videos shorter than 2 minutes and longer than 20 minutes, you would change:
const userMinVideoDuration = 60;
const userMaxVideoDuration = 600;
to:
var minDuration = 120; // Minimum duration
var maxDuration = "1200"; // Maximum duration
Don't forget to comment out maxDuration line if you are planning to use it!
This project is licensed under the terms of the MIT license.