Greasy Fork

Greasy Fork is available in English.

YouTube 进度条增强 / YouTube Progress Bar Enhancement

优化 YouTube 进度条显示效果,支持播放时间显示 / Enhance YouTube progress bar display with playback time indicator

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
le jin
日安装量
0
总安装量
61
评分
1 0 0
版本
1.1.2
创建于
2024-12-14
更新于
2026-03-03
大小
6.8 KB
许可证
MIT
适用于

YouTube 进度条增强 / YouTube Progress Bar Enhancement

功能介绍 / Features

主要功能 / Main Features

  • 优化进度条显示 / Enhanced Progress Bar Display

    • 提供更清晰、更醒目的播放进度条
    • Red and white color scheme for better visibility
  • 缓冲进度显示 / Buffer Progress Display

    • 半透明白色缓冲指示器
    • Semi-transparent white buffer indicator
  • 广告状态识别 / Ad Detection

    • 播放广告时进度条变为黄色
    • Progress bar turns yellow during ad playback
  • 时间显示 / Time Display

    • 左下角显示当前播放时间和视频总时长
    • Shows current playback time and total duration at bottom-left corner
    • 格式:MM:SS / MM:SSH:MM:SS / H:MM:SS
    • Format: MM:SS / MM:SS or H:MM:SS / H:MM:SS
  • 常驻显示 / Persistent Display

    • 进度条和时间显示在控制器隐藏时依然可见
    • Progress bar and time display remain visible when controls are hidden

配置选项 / Configuration Options

脚本提供以下可自定义的配置项 / The script provides the following customizable options:

配置项 / Config 默认值 / Default 说明 / Description
barHeight '3px' 进度条高度 / Progress bar height
barColor '#f00' 播放进度颜色 / Playback progress color
bufferColor 'rgba(255,255,255,.4)' 缓冲颜色 / Buffer color
backgroundColor 'rgba(255,255,255,.2)' 背景颜色 / Background color
adColor '#fc0' 广告颜色 / Ad color
transitionDuration '0.25s' 动画过渡时间 / Transition duration
showTimeDisplay true 是否显示时间 / Whether to show time

安装方法 / Installation

通过 GreasyFork 安装 / Install via GreasyFork

  1. 访问 GreasyFork 脚本页面

  2. 安装用户脚本管理器 / Install a Userscript Manager

    • Tampermonkey(推荐 / Recommended)
    • Violentmonkey
  3. 点击"安装此脚本" / Click "Install this script"

手动安装 / Manual Installation

  1. 下载脚本文件 / Download the script file
  2. 在脚本管理器中创建新脚本 / Create a new script in your userscript manager
  3. 复制粘贴脚本内容 / Copy and paste the script content

使用说明 / Usage Instructions

  1. 访问 YouTube 网站任意视频页面 / Visit any YouTube video page
  2. 进度条会自动显示在视频底部 / Progress bar will automatically appear at the bottom of the video
  3. 左下角会显示播放时间和总时长 / Playback time and total duration will display at bottom-left
  4. 播放广告时进度条会变为黄色 / Progress bar will turn yellow during ad playback

自定义配置 / Customization

如需修改配置,请在脚本中找到 CONFIG 对象并修改相应的值 / To customize, find the CONFIG object in the script and modify the values:

const CONFIG = {
    barHeight: '3px',           // 修改进度条高度 / Change progress bar height
    barColor: '#f00',           // 修改播放进度颜色 / Change progress color
    showTimeDisplay: true,      // true 显示时间 / false 隐藏时间
    // ... 其他配置 / other configurations
};

版本历史 / Version History

v1.1.0

  • 添加左下角时间显示功能 / Added bottom-left time display
  • 增加英文说明 / Added English descriptions

v1.0.0

  • 初始版本 / Initial release
  • 基础进度条增强功能 / Basic progress bar enhancement

常见问题 / FAQ

Q: 时间显示位置可以调整吗?/ Can I adjust the time display position?

A: 可以,修改 .youtube-time-display 的 CSS 样式中的 bottomleft 属性 / Yes, modify the bottom and left properties in the .youtube-time-display CSS styles.

Q: 如何关闭时间显示?/ How to disable time display?

A: 将 CONFIG.showTimeDisplay 设置为 false / Set CONFIG.showTimeDisplay to false.

Q: 脚本支持所有 YouTube 页面吗?/ Does the script work on all YouTube pages?

A: 支持,脚本匹配 *://*.youtube.com/*,会在所有 YouTube 页面运行 / Yes, the script matches *://*.youtube.com/* and runs on all YouTube pages.

许可证 / License

MIT License

联系方式 / Contact