Skip to content

feat: add video page only dark mode#720

Merged
keleus merged 1 commit into
keleus:mainfrom
pierpiao:feat/video-page-dark-mode
Jun 6, 2026
Merged

feat: add video page only dark mode#720
keleus merged 1 commit into
keleus:mainfrom
pierpiao:feat/video-page-dark-mode

Conversation

@pierpiao

@pierpiao pierpiao commented Jun 2, 2026

Copy link
Copy Markdown

Summary

Adds an optional videoPageDarkMode setting that enables BewlyCat dark styling only on Bilibili video playback pages.

This keeps the existing adaptToOtherPageStyles behavior unchanged while allowing users to darken video pages without applying BewlyCat page adaptation globally.

Details

  • Adds a videoPageDarkMode setting, defaulting to false.
  • Reuses existing video page dark styling through bewly-design.
  • Adds a narrower bewly-video-dark-only class for the video-only mode.
  • Detects video playback routes including /video/, /list/, /bangumi/play/, /cheese/play/, and /medialist/play/.
  • Handles Bilibili SPA route changes so the mode is applied or removed when entering or leaving playback pages.
  • Restores Bilibili semantic brand colors for video-only dark mode, including current UP name, charge button, and player danmaku send bar variables.

Validation

  • git diff --check
  • pnpm typecheck
  • pnpm lint
  • pnpm knip
  • pnpm build
  • pnpm build-firefox

Screenshots

Video page only dark mode disabled:

light

Video page only dark mode enabled in settings:

dark-on

Video page result:

dark-on-video

@pierpiao pierpiao marked this pull request as ready for review June 2, 2026 03:32
@keleus

keleus commented Jun 4, 2026

Copy link
Copy Markdown
Owner

如果是抽屉模式下的视频页,是亮色的还是暗色的,如果iframe里是暗色的,外面的首页的部分呢。

@pierpiao

pierpiao commented Jun 4, 2026

Copy link
Copy Markdown
Author

如果是抽屉模式下的视频页,是亮色的还是暗色的,如果iframe里是暗色的,外面的首页的部分呢。

在抽屉模式下打开视频页,视频页会切换到暗色,首页也会切换到暗色(仅限此标签页,新开的标签页不会受影响,依旧是亮色)。当退出到首页,会切回亮色。

video page dark

@keleus keleus merged commit eb2f273 into keleus:main Jun 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants