YouTube Recommendation History

Save and review YouTube homepage recommendations to prevent losing interesting videos after an accidental refresh.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
Kibidango086
今日安裝
0
安裝總數
35
評價
2 0 0
版本
1.7
建立日期
2025-06-10
更新日期
2025-06-14
尺寸
29.2 KB
授權條款
MIT
腳本執行於

YouTube Recommendation History (YouTube推荐内容回溯)

📝 Description | 简介

English:
This userscript saves and lets you review the YouTube homepage recommended videos. It helps you avoid losing interesting suggestions if you accidentally refresh the page.
Originally written with Claude.

中文:
这个油猴脚本用于保存并回溯 YouTube 首页的推荐内容,防止因为误点刷新而丢失那些你本想点开的好视频。
使用 Claude 协助编写。


🔧 Features | 功能特性

  • Automatically records YouTube homepage recommendations.
  • Allows you to go back and view previous recommendations.
  • Dark mode support.
  • No data collection or external requests.

  • 自动记录 YouTube 首页推荐内容

  • 可回溯并查看过去的推荐视频

  • 深色模式适配

  • 不收集任何数据,无外部请求


📓 Notes | 注意事项

  • By default, only the latest 5 records of homepage recommendations are kept.
    You can modify the line recommendationHistory.length > 6 to change this limit.
    However, setting the number too high may not work reliably.

  • The history is automatically cleared after 1 hour by default.
    You can change the line const maxAge = 1 * 60 * 60 * 1000 to adjust the time limit.
    Note: The actual expiration behavior may also be influenced by other browser or YouTube mechanisms,
    so the interval might not be strictly one hour.

  • 默认仅保留最近 5 条 首页推荐记录。
    你可以通过修改 recommendationHistory.length > 6 以自定义上限。
    但如果设置的数字太大,可能无法生效。

  • 历史记录默认在 1 小时后自动清理
    你可以通过修改 const maxAge = 1 * 60 * 60 * 1000 以自定义清理时间。
    注意:实际的过期机制可能还受到浏览器或 YouTube 自身的影响,
    因此不一定严格是 1 小时。