jiuyang5354/bilibili-margin
About
Yingjian MARGIN · Preview of a redesigned Bilibili home page and video playback page (Chrome/Edge extension) | A Chrome/Edge extension that redesigns Bilibili home, video, and search pages with liquid glass controls and shader backgrounds.
Design & MediaMeasured star growth
- in 24h
- +8
- in 7 days
- +49
- in 15 days
- +194
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
Original
MARGIN
A clearer way to browse Bilibili.
Clean layouts, liquid glass controls and animated backgrounds, with the native playback experience.
给 B 站换一个更清晰的界面。编辑式排版,保留熟悉的原生播放体验。
Download · Quick start · Features · FAQ · Changelog · Report an issue
About MARGIN
An open-source Edge / Chrome / Firefox extension for Bilibili's homepage, search, video and reading pages. It keeps the native player, danmaku and comments, while adding themes, filters, favorites shortcuts and a local activity heatmap. Settings and activity records stay on your device; weather uses third-party location and forecast services.
Preview
| Light homepage | Dark homepage |
|---|---|
![]() |
![]() |
View the player, command palette, favorites and search
| Video page | Command palette |
|---|---|
![]() |
![]() |
| Favorites | Search |
|---|---|
![]() |
![]() |
Screenshots illustrate the main interfaces; details may differ in the current version.
Quick start
- Download
margin.zipfrom the latest release and extract it to a permanent folder. - Open
edge://extensionsorchrome://extensionsand enable Developer mode. - Select Load unpacked and choose the folder containing
manifest.json. - Open or refresh Bilibili.
To update a manual installation, replace the extracted files, click Reload on the extension management page, then refresh Bilibili. See the changelog for release details.
Firefox (140+): install from Firefox Add-ons (recommended; permanent, auto-updating). Fallback: download margin-firefox.zip (direct link, always the latest), open about:debugging#/runtime/this-firefox, choose Load Temporary Add-on and select the zip; temporary add-ons are removed when Firefox restarts.
Other Chromium browsers (Brave, Opera, Vivaldi, Arc and others) can follow the Chrome steps but are not individually tested. Safari is not supported yet.
Features
| Area | What it offers |
|---|---|
| Home and search | Personalized recommendations, popular videos, infinite scrolling, refresh, and filters for keywords, uploaders, view counts and duration. |
| Native playback | Redesigned titles, uploader cards, episode lists and recommendations, while retaining the native player, danmaku, comments, quality and fullscreen controls. |
| Listening mode | Open the headphones shortcut on video pages to switch between video/danmaku and cover/lyrics views, display a live spectrum or waveform, use captions or local lyrics, and share the home background settings. |
| Danmaku airborne | Optional, off by default: danmaku that mention a time (such as "03:20" or "jump to 2:15") get an underline. Click to seek, with undo available. Parsed entirely on your device, with no network requests. |
| Favorites and watch later | Glass folder cards, watch-later lists, viewing progress and video context menus. |
| Activity | Year and month heatmaps, first opening time and daily usage, viewing-history backfill and data-source labels. |
| Reading and account pages | Reading layouts for posts, opus articles and columns, plus matching interfaces for spaces, history, feeds and messages; private chats support image preview/sending and native Bilibili emoji selection. |
| Appearance | Light, dark and system themes; 13 animated backgrounds, custom images and intensity controls, including Gateway flow and click shockwaves. |
| Shortcuts | Search suggestions, command palette, hover previews, a flippable profile card and an editable-city weather widget. |
| Local data | Settings and activity records stored locally, with JSON import and export. |
Some account features require a Bilibili login. Availability also depends on Bilibili's APIs, permissions and regional restrictions.
Listening mode loads on first use and starts audio analysis during playback. Lyrics can come from loaded player captions, imported LRC/text files, or the original video image. Select the return-to-playback control or press Esc to exit.
FAQ
How do I return to the original interface?
Choose the original-page option in the header menu, or add ?margin=off to the page URL. You can also disable MARGIN from its popup.
Does MARGIN replace the player or change my account?
Bilibili's native player handles playback. MARGIN requests page data using your current Bilibili session; favorites and watch-later actions still use Bilibili's APIs.
Does it update automatically?
Manually loaded extensions need the update steps above; the popup checks for newer GitHub releases. Versions installed from Edge Add-ons receive approved updates through the browser.
Do backgrounds keep animating?
On visible pages with GPU acceleration, backgrounds remain animated while scrolling, playing videos and opening drawers. They pause in hidden tabs and respect reduced-motion preferences. Software rendering retains a static safeguard to avoid slowing the page. The opening animation temporarily suspends the covered background. Rendering adapts to device and page load; a fixed 60fps is not guaranteed in every scenario. See the performance notes.
Privacy
From 0.6.4, optional external services and recent-search storage are off by default under Settings → Privacy. Allow external services to enable weather, community sponsor data, and manual update checks. Opted-in searches stay in extension storage, capped at eight entries with 30-day expiration and cleanup on read. App-feed authorization lasts for the current browser session by default. Enabling “Remember authorization” stores it on this device for up to 30 days or until the Bilibili authorization expires, whichever comes first.
Community advertisement skipping is off by default. When enabled, it queries BilibiliSponsorBlock using a four-character BVID hash prefix and skips marked sponsor ranges in ordinary BV videos, with undo. It sends no Bilibili cookies, account identifiers or full video ID to that service and cannot guarantee Bilibili completion metrics.
The developer does not operate an analytics or data-collection server. Settings, activity records and custom background images stay on your device; exported backups are yours to store.
Weather requests use ipwho.is for an approximate city. Supported Chinese cities prefer observations and daily forecasts from the National Meteorological Center at www.nmc.cn; unavailable hourly forecasts and precipitation probabilities are omitted. Overseas cities or unavailable domestic data use Open-Meteo. Providers receive only the IP, city, station code or coordinates needed for those requests. Bilibili account details, favorites and viewing history are not sent to weather providers. Read the privacy policy.
MARGIN is an independent open-source project, not an official Bilibili product and not affiliated with Bilibili.
Development and contributions
Use Node.js 22 to install dependencies and build:
npm ci
npm run build
Load dist/ as an unpacked extension. In an environment with the zip command, npm run pack creates margin.zip.
The project uses native TypeScript, CSS and Shadow DOM. Vite splits page modules by route, a background service worker merges activity timing, and Chinese fonts are split by character range.
Issues and suggestions are welcome. Include the page URL, reproduction steps and screenshots for interface changes, and preserve native playback when modifying video pages. See design references and credits for third-party attribution.
License
MIT License © 2026 jiuyang5354. Third-party components, fonts and assets retain their respective terms; see design references and credits and font licenses.
Explore related projects
Loading…





