# Bilibili-Gate: a userscript that rebuilds the Bilibili home page

> Bilibili-Gate is a TypeScript userscript that replaces the Bilibili home page with a faster recommendation feed, grouped and searchable dynamics, filters on views and duration, a dislike button wired to the recommendation system, and a full-screen mode with keyboard control. It ships to Greasy Fork, builds from a Vite and Turbo workspace, and detects two other popular scripts to avoid fighting them.

**magicdawn/Bilibili-Gate** — [UserScript]  Bilibili 自定义首页

- Repository: https://github.com/magicdawn/Bilibili-Gate
- Website: https://greasyfork.org/zh-CN/scripts/443530
- Stars: 817 · Forks: 24
- Language: TypeScript
- License: MIT
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/magicdawn-bilibili-gate

## What the script replaces

Bilibili-Gate is a userscript for a custom Bilibili home page, and the feature list is the clearest description of it.

The app recommendation content is moved to the desktop, and there is a dislike button that feeds the recommendation system, which needs an access key. Videos can be filtered by attributes such as view count, duration and title, or filtered by creator, and a floating preview lets you play a video in a picture-in-picture window. The dynamics feed is grouped, can be filtered by search term, can be filtered down from the all tab, and is cached locally so searching it is fast. Watch later, favourites and popular content are reachable in one place. Watch later, favourites and the weekly must-watch support random order. There are preset themes plus a colour picker, an adaptation for Bilibili-Evolved covering dark mode, a custom top bar and the theme colour, thorough keyboard support, and support for the IINA player on macOS.

The README also states a caveat about its own screenshots, that they were fetched anonymously without an access key and do not represent the author's preferences, and that the screenshots may be out of date, so the installed script is the thing to judge.

The practical reason the script can be faster is in the tab documentation. The PC desktop recommendation endpoint does not need an access key any more, the dislike function is gone compared with the app version, the built-in home page recommendation has video preview and danmaku preview while this project shows snapshot images as the mouse moves, the built-in API does not appear to recommend anime, and the recommendation results look better and are faster.

## Two ways to install, and a name with a history

The installation section offers the usual three routes, and one of them is a different thing from the others.

The main route is the Greasy Fork listing, which is also the homepage of the project. The second is a development build that includes unreleased changes, fetched as a .user.js file from a nightly branch. The third is installing from GitHub, which offers three artefacts: the release build, a minimised release build, and the CI build, and the Greasy Fork version is automatically synchronised from the source.

The project has a history worth knowing about, because it explains the shape of the code. It was forked from the indefined UserScripts repository, in particular its bilibiliHome script, and the README links the issue where that fork was discussed. The script was first called bilibili-app-recommend, and it was renamed to Bilibili-Gate after many features that had nothing to do with recommendations were added. The older script can export all of its settings to migrate them into Bilibili-Gate.

There is also a version split in the site itself. The script supports the current home page, which the README calls bili-feed4, and the old home page is handled by the upstream script in the indefined repository.

The project is TypeScript, MIT licensed, on the main branch, with the last push on 2026-10-18 and releases v0.35.6 on 2026-09-12, v0.35.7 on 2026-09-17 and v0.35.8 on 2026-09-26, so the version moves every few days and the Greasy Fork listing is the place to see the current one.

## Browsers, script managers and one explicit exclusion

The compatibility section is short and has a clear shape, with a green tick, a green tick and a red cross.

Chrome, Edge and Firefox are supported with ViolentMonkey, which is what the author uses, and with TamperMonkey. On macOS Safari the script works with the Userscripts extension, and it also works on iPad Safari. And macOS Safari with TamperMonkey is not supported, because that is a paid Safari extension, it is known to be incompatible, and the README says to use the free open source Userscripts extension instead.

That single exclusion is worth internalising, because the failure is not a subtle one. A script manager that injects into the page differently, or a Safari extension with a different injection model, can break a script that relies on intercepting the site's own network calls, and the author has clearly hit that and written it down rather than leaving people to guess.

The other rule is that the script must be run through a userscript manager at all. It is a .user.js file, so it is not a browser extension with its own permissions model and its own update process, it is code that runs inside a manager's sandbox, and that is why the choice of manager matters.

## Compatibility with other scripts, including one that switches the other off

Two other popular Bilibili scripts get a section each, and the answers are practical rather than diplomatic.

With Bilibili-Evolved, the homepage-related features are not supported, so the clean homepage and the minimal homepage of that script will conflict, while dark mode, the custom top bar and custom fonts are supported.

With BewlyBewly, the answer is a flat no. The script is not compatible, and when it detects BewlyBewly this script will exit automatically. There is an escape hatch, a special address that forces the script to run anyway.

That auto-exit is the interesting design decision. Two scripts that both rewrite the same page is a support burden and a broken page, so the script takes itself out of the way rather than letting the user debug the collision. The cost is that a user who wants both has to know about the special URL.

The dark mode story has its own sharp edge, and it is the kind of detail that saves an evening. After enabling Bilibili's in-beta dark mode, if you enable the Bilibili-Evolved custom top bar, a conflict in dark mode requires deleting the theme_style cookie or changing its value from dark to light. The alternative is to use the Dark Reader extension, which is not adapted but basically works.

So the guidance is a three-way choice: adapt your theme settings and edit a cookie, use Dark Reader and accept that it is not adapted, or do not run both scripts at once.

## The tabs, the data sources, and the two modes

The one-stop section lists the sources for each tab, which is the clearest map of what the script fetches.

The app recommendations tab is the default and is the one that needs an access key, and it is also the one with the dislike function, while the video publish date is missing from it. The PC desktop recommendations need no access key. The followed creators tab filters the desktop recommendations down to the accounts you follow, and the README warns it may be slow. Then there is the dynamics tab, the watch later tab, the favourites tab, the popular tab with its data source at the popular all path, the weekly must-watch tab with its source at the popular weekly path, and a custom tab where you can hide the tabs you do not want in the advanced settings.

Two modes change the shape of the page. The full-screen mode removes everything else from the home page and keeps only the recommendation block, it is on by default and used to be called the pure recommendation mode, and it supports infinite scroll and keyboard shortcuts. The recommendation toolbar has a sticky effect at the top, and it is compatible both with Bilibili's own top bar and with the Bilibili-Evolved custom top bar, whose position and height are freely settable. When the full-screen mode is off, the recommendation block stays at the top of the page for historical reasons.

There is also a centred mode, which lays the page out as a centred two-column grid like a phone, and a theme section with preset themes and a colour picker.

## Keyboard control, and the grouping decision in the dynamics feed

The keyboard section is the most detailed part of the documentation, and it is worth reading as an interface specification rather than a list.

In the full-screen mode the arrow keys select a video, Tab and Shift+Tab select a video as well, Esc clears the selection, and with nothing selected an arrow key picks the first visible video at the top. Enter opens the selected video, and Backspace opens the dislike dialog. The r key refreshes, with the same effect as the shuffle button at the top, and it is taken from the word refresh. The s and w keys add and remove from watch later, taken from save and watch, and the README notes that s conflicts with the Bilibili-Evolved shortcut, so you can use w.

The dialogs close by clicking the transparent area or with Esc, and shift with a comma opens and closes the settings dialog. In the dislike dialog the number keys one to six or the arrow keys pick a reason, Enter or the confirm button submits, and the last reason is selected by default, which is usually the not-interested option.

The dynamics feed has one algorithmic decision, and it is explained properly. When a group has few creators the script uses a merged timeline, otherwise it works from all the dynamics and filters by creator. The merged timeline means visiting each creator's timeline and stitching them together, which starts slowly but can load all the dynamics, and there is a blog post describing it. When filtering from all the dynamics instead, how many you end up with depends on the range of the all tab that Bilibili itself records.

The right-click menu varies by tab, with a fast block on the recommendation tabs, unfollow on the followed and dynamics tabs, a quick creator filter on the dynamics tab, and quick save, remove and move-to-front on watch later.

## A userscript compiled from a modern web application

The repository is more than a single .user.js file, and the build setup explains why.

The package manifest names the project bilibili-gate, keeps the version at 0.35.8, is private, declares the MIT licence, and pins the package manager to pnpm 12.14.0. The scripts are a modern web toolchain: Vite for development and building, Turbo to run the type check and lint across the workspace, TypeScript in project-reference mode, Vitest for the tests with a coverage script, and an unusual triple for formatting and linting, with oxlint and oxfmt alongside eslint, and a codefix script that runs all three.

The dependencies tell you what the interface is built from. React with Emotion, Ant Design 6 and its cssinjs package, the dnd-kit family for drag and drop, framer-motion for animation, ahooks, axios, clsx, dayjs, es-toolkit, a local storage library for the dynamics cache, a hotkeys package for the keyboard layer, and a small set of domain libraries including one for Bilibili video identifiers and one for a request helper.

Around that there is a lot of process tooling: a knip configuration to find unused files, a commitlint configuration, Husky for the git hooks, UnoCSS for the utility styles, four separate tsconfig files, and turbo.jsonc for the task graph.

And then the directories that stand out. There is an archive/ directory, a notes/ directory, and, at the root, .agents/, .codex/ and a skills-lock.json, which together suggest the same pattern seen elsewhere: a repository that has been arranged for coding assistants as much as for people, with the notes and the archived versions kept alongside the source.

## Conclusion

Adopt Bilibili-Gate if you use Bilibili every day and the stock home page frustrates you, because the script takes the recommendation API directly, which the README says needs no access key on the desktop endpoint, and it works in Chromium and Firefox with either Violentmonkey or TamperMonkey. Do not adopt it expecting it to work everywhere, because macOS Safari with TamperMonkey is explicitly unsupported, and it disables itself when it detects BewlyBewly, since two scripts rewriting the same page is a fight nobody wins. Before you install it, read the compatibility notes for Bilibili-Evolved, because the top bar and dark mode interact and the fix involves deleting a cookie, and check the access key requirement of the app recommendation tab, which is the only feature that still needs one.

## FAQ

### How do I install Bilibili-Gate?

From the Greasy Fork listing, which is the project's homepage, or from a development build that includes unreleased changes. There are also GitHub artefacts, a release build, a minimised release build and the CI build, and the Greasy Fork version is synchronised from the source automatically.

### Does Bilibili-Gate work in Safari?

On macOS Safari it works with the Userscripts extension, and it also works on iPad Safari. What is not supported is macOS Safari with TamperMonkey, which is a paid Safari extension known to be incompatible, so the README recommends the free open source Userscripts extension instead.

### Does Bilibili-Gate work alongside Bilibili-Evolved or BewlyBewly?

With Bilibili-Evolved, dark mode, the custom top bar and custom fonts are supported while the homepage features conflict. With BewlyBewly it is not compatible, and the script exits automatically when it detects it, unless you use the special address that forces it to run.

### What keyboard shortcuts does Bilibili-Gate support?

In full-screen mode the arrow keys and Tab select a video, Esc clears the selection, Enter opens it, Backspace opens the dislike dialog, r refreshes, and s or w add and remove from watch later, with w recommended because s conflicts with a Bilibili-Evolved shortcut. Shift with a comma toggles the settings dialog.

## Sources

- [License: MIT](https://github.com/magicdawn/Bilibili-Gate/blob/main/LICENSE)
- [magicdawn/Bilibili-Gate on GitHub](https://github.com/magicdawn/Bilibili-Gate)
- [Project website](https://greasyfork.org/zh-CN/scripts/443530)
- [README](https://github.com/magicdawn/Bilibili-Gate/blob/main/README.md)
- [Releases](https://github.com/magicdawn/Bilibili-Gate/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/magicdawn-bilibili-gate
