YouTube: Remove Videos Based on Duration

Remove too short or too long videos from your YouTube's recommendation

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
kuronekozero
今日安裝
0
安裝總數
52
評價
0 0 0
版本
0.2
建立日期
2023-10-29
更新日期
2024-10-21
尺寸
2.1 KB
授權條款
MIT
腳本執行於

YouTube: Remove Videos Based on Duration

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:

How does it work?

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.

Customizing the Duration Thresholds

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!

License

This project is licensed under the terms of the MIT license.