How sterilitzia02/bewly_nocturne works
Bewly Nocturne is a Bilibili browser extension that adds customized content views, account-aware state, page enhancements, and a distinct visual system. The principal workflow is user navigation in a Bilibili tab, extension-rendered content views and interactions, then requests through extension messaging to Bilibili services. The README documents additional settings, Dock, theme, compatibility, and synchronization capabilities. Sampled source confirms storage coordination and selected feature behavior; unsampled subsystem wiring is represented conservatively.
Main entry points: background/index.ts Background coordinator · TopBar.vue Dock and top bar · contentScripts/index.ts Content script entry · Notifications.vue Notifications and chat
Components 20
Content experience
- Content script entry
src/contentScripts/index.ts - Home and feeds
src/contentScripts/views/Home/Home.vue - Search experience
src/contentScripts/views/SearchResults/SearchResults.vue - Moments feed
src/contentScripts/views/Moments/Moments.vue - Notifications and chat
src/contentScripts/views/Notifications/Notifications.vue - Watch Later
src/contentScripts/views/WatchLater/WatchLater.vue - Dock and top bar
src/components/TopBar/TopBar.vue
Extension messaging
- Background coordinator
src/background/index.ts - Bilibili API handlers
src/background/messageListeners/api/index.ts - Private message transport
src/background/privateMessage/index.ts
Settings and appearance
- Settings interface
src/components/Settings/Settings.vue
Page enhancements
- Player and page features
src/contentScripts/features/watchLaterAutoRemove.ts - Visual adaptations
src/styles/adaptedStyles/index.ts
State and storage
- Settings storage
src/composables/useSettingsStorage.ts - Settings coordinator
src/background/settingsStorageCoordinator.ts - Extension local storage
src/composables/useStorageLocal.ts - Settings definitions
src/logic/storage.ts
Other components
- Bilibili user
- Bilibili services
- Bilibili tab
Connections 25
- Bilibili user → Bilibili tab: uses
- Bilibili tab → Content script entry: hosts
- Content script entry → Dock and top bar: renders
- Dock and top bar → Home and feeds: opens
- Dock and top bar → Search experience: opens
- Dock and top bar → Moments feed: opens
- Dock and top bar → Notifications and chat: opens
- Dock and top bar → Watch Later: opens
- Home and feeds → Background coordinator: requests data
- Search experience → Background coordinator: requests data
- Moments feed → Background coordinator: requests data
- Notifications and chat → Background coordinator: requests data
- Watch Later → Background coordinator: requests data
- Background coordinator → Bilibili API handlers: dispatches
- Bilibili API handlers → Bilibili services: calls APIs
- Notifications and chat → Private message transport: uses messaging
- Private message transport → Bilibili services: exchanges messages
- Settings interface → Settings storage: reads and writes
- Settings storage → Settings coordinator: sends patches
- Settings coordinator → Extension local storage: reads and writes
- Settings coordinator → Background coordinator: handles messages
- Settings definitions → Settings storage: defines settings
- Settings interface → Extension local storage: stores local preferences
- Content script entry → Player and page features: activates
- Content script entry → Visual adaptations: applies styles