Open-source project
festoney8/bilibili-cleaner avatar
festoney8/bilibili-cleaner

bilibili-cleaner: a userscript that filters and simplifies Bilibili

bilibili 页面净化大师,深度净化 B 站,优化功能,过滤视频 / 评论 / 动态

1,028 stars31 forksTypeScriptMIT

At a glance

What is it?
bilibili-cleaner is a Tampermonkey-style userscript that cleans up the Bilibili web interface and filters videos, comments, and dynamic posts by duration, uploader, keywords, and BV number. Its filtering model puts the whitelist above the blacklist, and its settings are per page rather than global.
Who is it for?
Adopt bilibili-cleaner if you spend a lot of time on Bilibili and want the recommended and comment feeds narrowed down without leaving the site. Do not adopt it if you need the mobile web experience, since the project states it does not target mobile pages.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A page cleaner that lives in a userscript manager

bilibili-cleaner is a userscript, distributed through Greasyfork and installable into Tampermonkey, Violentmonkey, or ScriptCat. The project's own tagline calls it a page purification master for Bilibili, and the three functional pillars are page cleanup, video filtering, and comment and dynamic filtering.

The cleanup side removes useless elements from the top bar, the video list, the player, and the comment area, and it optimises some of the built-in behaviour. The project states that it targets the new version of the Bilibili web page, that the default assumption is that you are logged in, and that the experience is best with a premium membership. It also says plainly that it does not adapt to the old page layout and does not adapt to the logged-out state, which is a scope decision that saves a lot of maintenance and would otherwise surprise a new user who opens the site in a private window.

The last piece is the tuning advice, which is unusual to find in a project README. The documentation suggests mixing the features and adjusting the browser zoom level to get a layout you are happy with. That is an admission that a userscript restyles an interface it does not own, and the browser is the only knob available.

The project is MIT licensed, written in TypeScript, and the current release is v4.5.13 from 2026-09-28, with v4.5.12 and v4.5.11 published in the preceding week. The last push to the repository was on 2026-10-09. The homepage is the Greasyfork script page at greasyfork.org/zh-CN/scripts/479861.

Whitelist outranks blacklist, and that shapes everything

The filtering model is worth understanding before you write any rules, because it determines how the options behave when they conflict. For video filtering, the whitelist has higher priority than the blacklist, and a video that hits the whitelist will not be hidden. The same rule applies to comments. The documentation repeats the consequence several times in different sections: if you block something and it does not disappear, the likely reason is that it matched the whitelist.

The filters themselves are granular. Video filtering can select on duration, on the uploader, on title keywords, and on BV number. The uploader filter and the BV number filter have a convenient interaction: once the uploader filter is enabled you can right click a uploader to block them, and once the BV number filter is enabled you can right click a video title to block it. That is a much faster workflow than typing names into a settings form, and it is the kind of detail that decides whether a filtering tool gets used daily or abandoned.

There is one scope rule that is easy to miss. Each page has its own feature switch, but the title keyword blacklist and whitelist are shared across the whole site. So you can enable video filtering only on the search page while the same keywords still apply elsewhere, which is a deliberate split between the on/off switch and the rule set.

Comment filtering works on a different set of attributes, including username, keyword, comment type, and user level. Dynamic filtering covers the dynamic feed and selects on username and video title. The documentation lists the pages each filter applies to, and the menus are per page, with the homepage, playback page, bangumi playback page, live room, search page, dynamic page, popular page, and category page carrying the cleanup options, and the playback, bangumi playback, dynamic, and space pages carrying the comment options.

The regex dialect, and the advice to keep it simple

Both the video title filter and the comment keyword filter support regular expressions, and the syntax is spelled out: a pattern is wrapped in slashes, for example /abc|\d+/, with no flags needed because the default mode is ius, meaning case insensitive, dot matches newlines, and it supports multiline matching.

The interesting part is the guidance around it. The documentation warns that duration filters should not be too long and recommends 60 to 90 seconds, otherwise you will miss good videos. It warns that keywords should not be too simple, because that causes collateral damage and hiding too many videos ruins the browsing experience. It warns that writing regular expressions needs care, since a careless pattern can hide a large number of videos and cause frequent page reloads. And it warns that a whitelist has a wide effect, since its priority is high and it can let unwanted videos appear.

The last piece of advice is the most operationally useful. It notes that low-quality creators you dislike often turn up in the popular videos, the weekly must-watch, and the leaderboard sections, so you should go and block them in the popular page too. And if you meet a high-quality creator you like, you can add them to the whitelist while you are there.

There is also a reference file for common title keywords, a NOTE.md in the repository, and one documented quirk worth knowing: video filtering does not work on the homepage variant that carries an index.html suffix, so you have to use the homepage without that suffix at https://www.bilibili.com/.

Installing it, and the browser version floors

The installation is a userscript install, and the important part is the browser preparation. Firefox needs no extra steps. For Edge and Chrome, you open the script manager, whether that is Violentmonkey, Tampermonkey, or ScriptCat, go into manage extensions, enable the option to allow user scripts if it appears, turn on developer mode, and restart the browser.

The version requirements are specific and worth reading before you install. For Chromium based browsers, the requirement is a Chromium kernel version of 105 or higher, and the documentation warns that a kernel that is too old causes a large number of features to fail, with the top bar cleanup named as an example. For Firefox, versions 103 to 120 need a configuration change: open about:config, accept the risk warning if it appears, search for layout.css.has-selector.enabled, set it to true, and refresh the page. Firefox 121 and later need no change. For Safari, the requirement is version 15.4 or higher, and the project notes that feature availability is untested there.

The mobile situation is a non-goal. The project states that it focuses on the PC web page and does not adapt to the mobile web page, and it suggests that if you insist, Firefox or Edge on mobile with the Tampermonkey extension is the best you can do.

There are three update sources, and the distinction between them is worth knowing. The Greasyfork link gives the stable version. A GitHub raw link on the release branch gives a test build. A JSDelivr CDN link gives a test build as well, and the documentation notes it exists to solve connectivity problems.

Script manager support is uneven across the ecosystem

The script manager table is one of the more useful pieces of documentation in the project, because it distinguishes supported from merely claimed. Tampermonkey is marked as fully tested and recommended, and it is the only one marked as fully tested. Violentmonkey and ScriptCat are both supported with the MV3 standard and are marked as partially tested. Greasemonkey is marked as unsupported and untested, and Stay is marked as unsupported and unable to run.

The MV3 column matters because of the Chrome and Edge extension changes. A script manager that has not been updated for Manifest V3 will not be able to run user scripts in a current Chromium browser, and the two unsupported managers are the ones most likely to have that problem. Since the script itself is the thing being installed, and the script manager is the thing that has to be able to host it, this table is the fastest way to avoid a dead end.

The project also keeps a compatibility section with other Bilibili scripts, which is the part of a userscript's documentation that tells you about the underlying fragility of the platform. With Bilibili-Evolved, most features are compatible and a few overlap without breaking anything, and there are specific instructions for the hide-banner option depending on whether you are using the Evolved night mode, the Evolved top bar, or neither. The clean homepage and minimal homepage options from Evolved take over the homepage layout, which makes this script's cleanup ineffective on that page.

With Bilibili-Gate the script is compatible, and since Gate ships its own uploader blacklist and title keyword filtering, the documentation says you do not need this script's filtering on the homepage. With the old Bilibili playback page script the answer is that they are not compatible, because that script takes over the page completely, and you should disable the cleaner in your script manager. With Pakku.js it is compatible and recommended. With BewlyBewly it is not compatible with the new BewlyBewly homepage, and it is compatible when BewlyBewly uses the original Bilibili homepage.

Backups, known bugs, and what the project is built on

The storage side is where userscripts usually surprise people, and the project is unusually clear about it. The warning is that if you have enabled a lot of features or blocked a lot of content, you should back up regularly, and that if you change computer or browser you must back up, with the method given in the import and export section.

The reason is that the script manager's sync feature only syncs the code. The Tampermonkey and Violentmonkey sync scripts feature can synchronise the code but not the data, so synchronising your settings needs the import and export path or the cloud backup feature instead. The export path is a selection in the script manager, the cloud backup is a button that stores all script code and local data in the cloud with a history you can view, and Violentmonkey does not have that cloud feature, only local backup. There is also a way to copy the JSON data directly through the script manager's advanced mode, with a warning not to edit the JSON without understanding the consequences.

Two known bugs are documented. Charging a creator can fail with a charging window load error reporting NaN, and the workaround is to turn off the general option for URL parameter cleanup and refresh the page before trying again. And for special event live streams, changing the script settings requires a page refresh to take effect, and the danmaku cleanup does not take effect at all.

The stack is visible in the acknowledgements and the package manifest. The project credits vite-plugin-monkey for the userscript build, Vue, VueUse, Pinia, Tailwind CSS, and Headless UI, and the manifest confirms it with vue, pinia, @vueuse/core, tailwindcss, and @headlessui/vue as dependencies, along with n-gram and emoji-regex-xs for text matching, p-limit for concurrency limiting, and universal-cookie for cookie handling. The build runs vue-tsc for type checking before vite build, and the development environment asks for Node 24 or newer and pnpm 12 or newer, with pnpm 12.3.4 as the package manager. The branch layout separates main for releases, dev for development and pull requests, and a release branch managed by CI that stores the GitHub and JSDelivr sources.

Editorial conclusion

Adopt bilibili-cleaner if you spend a lot of time on Bilibili and want the recommended and comment feeds narrowed down without leaving the site. Do not adopt it if you need the mobile web experience, since the project states it does not target mobile pages. Verify first that your browser and script manager meet the stated version floors, because a Chromium kernel below 105 breaks a lot of the cleanup features.

Frequently asked questions

What does bilibili-cleaner do to the Bilibili page?

It cleans up the top bar, video list, player, and comment area, removes useless elements, and optimises some built-in behaviour. It targets the new version of the Bilibili web page, assumes you are logged in, and states it does not adapt to the old layout or the logged-out state.

How do I block a video by uploader or BV number?

Enable the uploader filter and then right click an uploader to block them, and enable the BV number filter and then right click a video title to block it. The title keyword blacklist and whitelist are shared site wide, while the on and off switch for filtering is per page.

Which script managers support bilibili-cleaner?

Tampermonkey is fully tested and recommended, and Violentmonkey and ScriptCat are supported with partial testing. Greasemonkey is listed as unsupported and untested, and Stay is listed as unable to run.

What are the browser requirements for bilibili-cleaner?

Chromium based browsers need a kernel version of 105 or higher, otherwise many features fail. Firefox 103 to 120 need layout.css.has-selector.enabled set to true in about:config, while Firefox 121 and later need no change. Safari needs version 15.4 or higher, with feature availability untested, and the mobile web page is not supported.

How do I back up my bilibili-cleaner settings?

The script manager sync function only syncs code, not data, so settings have to be moved with the import and export feature or with the cloud backup. The cloud backup stores all script code and local data and is available in Tampermonkey, while Violentmonkey only supports backup to a local file.

Official sources

  1. festoney8/bilibili-cleaner on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/festoney8-bilibili-cleaner.svg)](https://hysenlabs.com/projects/festoney8-bilibili-cleaner)

Was this useful?