概述
此脚本将 Bilibili 网页播放器使用方向键 ↑ / ↓ 调节音量的步进从 10% 修改为 5%,并在屏幕中央显示一个仿原生样式的音量提示浮层,兼容普通模式、网页全屏与浏览器全屏。
主要功能
- 将音量调整步进改为 ±5%(可在脚本中自定义)。
- 在屏幕中央显示淡入淡出动画的音量提示(仿 B 站原生 UI)。
- 兼容普通、网页全屏与真全屏。
- 不会干扰输入框、弹幕或评论输入操作。
- 轻量级、无依赖,仅操作标准 HTML5
<video> 元素。
快捷键
自定义
如需更改音量调整步进值,请在脚本中找到:
let delta = 0.05; // 0.05 = 5%
例如,改为 0.02 即为每次 2% 调整。
安装说明
- 安装 Tampermonkey / Violentmonkey 等用户脚本管理器。
- 新建脚本并粘贴完整脚本(含元数据头部)。
- 保存后访问 Bilibili 视频页面测试效果。
来源与说明
用户仅提供 AI 提示词,脚本的完整代码由 ChatGPT (GPT-5) 编写。
许可协议
采用 MIT License 或发布者选择的其他开源许可协议。转载与再发布请保留署名与来源声明。
标签建议
bilibili, volume, keyboard, video, fullscreen, enhancement
更新日志
此处为更新日志占位符,可在每次更新后补充版本说明。
Overview
This userscript changes Bilibili’s default volume step when pressing ↑ / ↓ from 10% to 5%, and displays a centered on-screen volume indicator styled to resemble the native Bilibili overlay. It supports normal, web-fullscreen, and browser fullscreen modes.
Features
- Change volume step to ±5% (configurable in the script).
- Centered floating volume indicator with smooth fade animation.
- Works in normal, web, and full fullscreen modes.
- Does not interfere with input fields or comment boxes.
- Lightweight and dependency-free; interacts only with HTML5
<video> elements.
Keyboard Shortcuts
↑: Increase volume by 5%↓: Decrease volume by 5%
Customization
To change the adjustment step, locate the following line in the script:
let delta = 0.05; // 0.05 = 5%
For example, setting it to 0.02 will make each step 2%.
Installation
- Install a userscript manager such as Tampermonkey or Violentmonkey.
- Create a new script and paste the full code (including metadata header).
- Save and open any Bilibili video page to test.
Source & Notes
The user only provided the AI prompt; the complete script code was written entirely by ChatGPT (GPT-5).
License
Released under the MIT License (or another open-source license chosen by the publisher). Please retain attribution and source when redistributing.
Tags
bilibili, volume, keyboard, video, fullscreen, enhancement
Changelog
Placeholder for future changelog entries.
💡 提示 / Note: 建议将此 HTML 粘贴于 GreasyFork 的“完整描述 (Full Description)”栏中,以获得最佳显示效果。