$ show the1812/Bilibili-Evolved
Bilibili-Evolved is a powerful userscript (Tampermonkey/Greasemonkey) that enhances the Bilibili video platform with a modular component and plugin system. It injects into Bilibili pages and provides a wide range of features including video player enhancements (speed control, screenshot, remember progress), danmaku management (merging, downloading, conversion), UI customization (dark mode, custom navbar, home page redesign), feed filtering, live streaming tools, and video downloading with multiple output formats. The architecture is based on a core framework in `src/` that handles settings, DOM observation, style injection, toast notifications, and lifecycle management, while individual features are defined as components in `registry/lib/components/` using a metadata-driven pattern (`defineComponentMetadata`). Features can be installed, updated, and configured through a built-in settings panel. The project relies heavily on Bilibili's internal APIs and DOM structure, making it tightly coupled to the platform but also highly functional for power users. It uses Vue 2 for UI, TypeScript for type safety, and SCSS for styling, with a custom build pipeline using Webpack and pnpm.
The LLM identified 4 files worth highlighting for reuse:
A minimal, self-contained implementation of RxJS patterns including Subject, BehaviorSubject, and common operators (map, filter, debounceTime, distinctUntilChanged, combineLatest). Used internally for reactive event streams in the video player (e.g., gesture handling, speed changes). The entire library is contained within a few files and could be extracted as a standalone lightweight reactive library for any JavaScript project.
A collection of utility functions that wrap native MutationObserver and IntersectionObserver for common DOM observation patterns. Provides `childList`, `childListSubtree`, `attributes`, `sizeChange`, `urlChange`, and `videoChange` observers with debouncing and cleanup. These utilities are framework-agnostic and can be reused in any web application that needs to react to DOM changes without coupling to a specific UI library.
A lightweight toast notification system supporting multiple types (info, success, error, warning) with both mini-toast and card-based containers. Features include auto-dismiss, stacking, and programmatic control. The core logic is implemented in TypeScript with Vue 2 components for rendering, but the notification management layer is cleanly separated and could be adapted to other frameworks or vanilla JS.
A utility class `DownloadPackage` that simplifies creating downloadable files in the browser. Supports single-file downloads and multi-file ZIP archives using the fflate library. Provides a clean API for adding files with custom names, tracking progress, and triggering downloads. This pattern is reusable in any web application that needs to generate and download bundled content client-side.