jiuyang5354

bilibili-margin

MARGIN is a Bilibili browser extension for Edge, Chrome and Firefox that re-typesets the homepage, search and video pages while keeping the native player and danmaku.

v0.70.0
Published at
1d ago
1,146
Stars
2,430
Download
Synced at
8h ago

Latest release

v0.70.0Nov 25, 2026, 09:57 AM
Downloads slow? Switch the source anytime above

README

Project Overview

When you want a calmer Bilibili without giving up the native player, MARGIN lays a re-typeset layer over the site. It rearranges the home feed, search results, video page, dynamic feed and profile pages into an editorial layout, then adds liquid-glass controls and animated backgrounds, while playback, danmaku, comments and quality switching stay with Bilibili's own logic. The extension is written in TypeScript and keeps page styles inside Shadow DOM; settings and activity records live only in the browser.

Item Value
Type Browser extension (Manifest V3)
Hosts Edge, Chrome, Firefox
Version 0.60.21
License MIT
Package margin.zip, about 4.2 MB

A new shell around the same player, with native danmaku and comments untouched.

Supported Browsers

Browser Status
Edge / Chrome Chrome 110 or newer, load the unpacked folder in developer mode
Firefox 140 or newer, store build available
Brave / Opera / Vivaldi / Arc Follow the Chrome steps, not individually tested
Safari Not supported

Key Features

  • Home and search relayout: recommendation feed, popular videos, endless loading and reshuffle, with keyword, uploader, view count and duration filters
  • Native video page: retypeset title, uploader card, episode list and recommendations, while player, danmaku, comments and fullscreen stay intact
  • Danmaku jump: off by default, underlines timestamps such as 03:20 or 2:15, jumps on click and can be undone, parsing text locally only
  • Favorites and Watch Later: a glass-folder favorites drawer, Watch Later list, watch progress and a video context menu
  • Activity heatmap: year and month views, first open time and dwell time per day, with watch history backfill
  • Reading and account pages: layouts for dynamic feed, articles and columns, unified space, history and message pages, image previews and native emoji in private messages
  • Appearance and backgrounds: light, dark and system themes, 13 animated backgrounds, custom images and intensity control
  • Quick actions: search suggestions, command palette, hover previews, a flippable avatar badge and a weather card with a changeable city
  • Local backup: settings and activity export to JSON and import from a backup file

Interface and Appearance

  • Header entry: both the popup and the page header menu toggle the relayout, and the menu offers an Original option for a quick revert
  • Link revert: append ?margin=off to any Bilibili URL to render the current page the stock way
  • Background scheduling: renders while the page is visible with GPU acceleration, pauses in hidden tabs and respects the system reduce-motion setting
  • Font splitting: Chinese font files are sliced by character range, so the first screen loads only the glyphs it uses

Installation and Enabling

  1. Download margin.zip and extract it to a fixed folder, overwriting that folder when upgrading
  2. Open edge://extensions or chrome://extensions and turn on developer mode in the top right
  3. Click Load unpacked and pick the folder that contains manifest.json
  4. Open or refresh Bilibili at www.bilibili.com and the page styling takes over automatically
  5. On Firefox, install the store build or load margin-firefox.zip temporarily at about:debugging#/runtime/this-firefox
  6. After an upgrade, click Reload on the extensions page and refresh Bilibili

Permissions and Scope

Permission Purpose
storage Settings, activity records and backups
https://app.bilibili.com/* Endpoints behind the app recommendation feed
https://bsbsb.top/* Community ad markers looked up by BVID hash prefix, off by default
Content scripts Injected on www, search, space, t, message and live.bilibili.com

The extension requests no wildcard host permission and never injects into non-Bilibili pages.

Notes

  • Login required: favorites, Watch Later and private messages go through Bilibili endpoints, so the browser must be signed in
  • External services off by default: weather, community ad markers and manual version lookup are opt-in, and weather sends a city or coordinates to ipwho.is and Open-Meteo
  • Local record caps: recent searches keep at most 8 entries, expire after 30 days and are cleaned up on read
  • Temporary loads expire: an extension loaded through about:debugging is removed when Firefox restarts

Release history

Sort