Repository navigation
v0.5.1 adds motion to the panel and the ⚡ badge. An animation runs only while the process it stands for is running, and standing states stay still. Server selection is unchanged.
What changed
- Status dot. Playing smoothly: two rings leave the dot and it pulses while the video is advancing. Testing: an arc circles the dot for the length of the race. Buffering: a ring closes in on the dot. Slow network, Ready and Off do not animate. Colors fade between states.
- Speed card. While the panel is open the curve is redrawn every frame, so it advances continuously between the one-second samples, and the readout counts to each new value. During smooth playback a highlight runs along the curve and the endpoint pulses. The endpoint dot is no longer clipped at the chart's right edge.
- Badge. It never loops. The bolt flickers once on hover and the badge shrinks while pressed. A server switch sends one ring out from the badge, the only sign of a switch on the page while the panel is closed. The rim is now uniform; it used to be brighter and thicker along the top.
- When it is off. The panel's frame loop does not run while the panel is closed or the tab is hidden. Under
prefers-reduced-motionthese animations are disabled and the chart updates once a second, as in 0.5.0.
Upgrade notes
Settings are preserved and no panel copy changed. Update the userscript or extension, then reload any open Bilibili tabs.
115 tests pass, unchanged, with a reproducible build matching the committed dist/. The browser tests added in #42 pass in Chromium and WebKit.
Full change set: #41
更新内容(中文)
0.5.1 为面板和 ⚡ 按钮加入动效。动效仅在其对应的过程进行期间播放,静态状态不播放。线路选择逻辑未改动。
本次改动
- 状态点。 播放流畅且视频正在播放时,状态点向外扩散两圈光环并轻微缩放;测试线路期间有弧线环绕;缓冲时光环向内收拢。「网络较慢」「就绪」「已关闭加速」不播放动画。状态切换时颜色渐变过渡。
- 速度卡片。 面板打开期间曲线逐帧重绘,在每秒一次的采样之间连续推进,读数过渡到新值。播放流畅时曲线上有高光流过,末端圆点发出脉冲。末端圆点不再被图表右边缘裁切。
- ⚡ 按钮。 不循环播放动画。悬停时闪电闪动一次,按下时按钮缩小。切换线路时向外扩散一圈光环,面板关闭时这是页面上唯一的切换提示。外圈描边改为宽度、亮度一致,此前上半圈偏亮偏粗。
- 停用条件。 面板关闭或标签页位于后台时,不运行面板的逐帧重绘。系统开启「减弱动态效果」时,上述动画全部停用,图表按 0.5.0 的方式每秒更新一次。
升级说明
原有配置保持不变,面板文案未改动。更新用户脚本或扩展后,刷新已打开的 B 站页面即可生效。
已通过 115 项测试(数量未变),重新构建产物与仓库内 dist/ 一致。#42 新增的浏览器测试在 Chromium 与 WebKit 下通过。
完整改动见 #41。