Greasy Fork is available in English.
优化 YouTube 进度条显示效果,支持播放时间显示 / Enhance YouTube progress bar display with playback time indicator
优化进度条显示 / Enhanced Progress Bar Display
缓冲进度显示 / Buffer Progress Display
广告状态识别 / Ad Detection
时间显示 / Time Display
MM:SS / MM:SS 或 H:MM:SS / H:MM:SSMM:SS / MM:SS or H:MM:SS / H:MM:SS常驻显示 / Persistent Display
脚本提供以下可自定义的配置项 / 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 |
安装用户脚本管理器 / Install a Userscript Manager
点击"安装此脚本" / Click "Install this script"
如需修改配置,请在脚本中找到 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
};
Q: 时间显示位置可以调整吗?/ Can I adjust the time display position?
A: 可以,修改 .youtube-time-display 的 CSS 样式中的 bottom 和 left 属性 / 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.
MIT License