@hanydd/bilibilisponsorblock
B受够了视频中无处不在的赞助广告了吗?受够了看了一半才发现的软广视频了吗?小电视空降助手是一款帮你精准空降到广告之后的浏览器插件。插件自动获取并跳过广告片段,让你的视频体验毫无中断!
Install
agr install @hanydd/bilibilisponsorblock --target codexWrites 1 file into AGENTS.md, pinned to git-ce0c96b1.
- AGENTS.md
Document
General
This is a Chromium browser extension (BilibiliSponsorBlock / 小电视空降助手) that skips sponsor segments on Bilibili videos. It is a single-product npm repo (not a monorepo). This project builds with npm.
Non-obvious caveats
config.jsonmust exist before building. Copy fromconfig.json.exampleif it does not exist. If you getCompileConfigorproperty does not exist on type ConfigClasserrors, deleteconfig.jsonand re-copy from the example.npm run testruns a full Chrome build first, then Jest. Usenpm run test-without-buildingto skip the build step when you already have adist/directory.- The
dist/directory is the unpacked extension. Load it in Chrome viachrome://extensions→ Developer mode → "Load unpacked". - To launch Chrome with the extension from the command line:
google-chrome --no-sandbox --disable-gpu --load-extension=/workspace/dist --start-url="https://www.bilibili.com". - The extension communicates with an external backend API (
https://www.bsbsb.top). No local backend is needed for standard development/testing. - Unit tests cover URL parsing, BV/AV ID conversion, and danmaku utilities. They do not require network or browser access. Most functions of this extension are not covered by unit tests.
Repository README
Describes hanydd/BilibiliSponsorBlock as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.
| Chrome | FireFox | 讨论群 |
|---|---|---|
受够了视频中无处不在的赞助广告了吗?受够了看了一半才发现的软广视频了吗?小电视空降助手是一款帮你精准空降到广告之后的浏览器插件。插件自动获取并跳过广告片段,让你的视频体验毫无中断!
除了广告之外,插件还支持跳过其他类别的片段,例如开场结尾的动画、一键三连提示,或者直接空降到视频封面的位置。插件中所有的标注片段都来自网友标注,您也可以提交自己的片段来为空降指挥部添砖加瓦。
想知道大佬们提交了多少片段?在排行榜看看吧。
目前本项目由我个人在业余时间维护,如果你想支持我,欢迎查看赞助。
本插件移植自插件SponsorBlock,保留了大部分的 UI 和使用方法,加入了一些小电视特色的功能。
安装
-
目前上架了Chrome 应用商店,火狐应用商店。如果你知道更多流行的浏览器插件商店,欢迎留言~
-
如果你无法打开上面的商店,可以尝试从 GitHub Release 页面获取未打包的插件。
-
根据您浏览器的类型下载适合的版本,Chrome、Edge、360 和基于 Chromium 的国产浏览器下载
ChromiumExtension.zip;火狐浏览器下载FirefoxExtension.zip。并解压缩。 -
打开浏览器的插件管理页面,启用“开发者模式”,点击
加载已解压的扩展程序,选择刚刚下载解压的插件文件夹,就可以完成安装。
-
macOS Safari 安装(源码构建)
Safari 版本通过 Safari Web Extension 打包。项目已提供一键脚本:
# 先准备配置文件和依赖
cp config.json.example config.json
npm ci
# 构建 Safari 扩展并生成 macOS Xcode 工程
npm run build:safari:macos
默认会在项目根目录生成 safari/ Xcode 工程。然后:
- 使用 Xcode 打开
safari/工程并编译运行。 - 打开 Safari -> 设置 -> 扩展,启用对应扩展。
可选环境变量(用于自定义工程信息):
BSB_SAFARI_APP_NAME="小电视空降助手" \
BSB_SAFARI_BUNDLE_ID="top.bsbsb.safari" \
BSB_SAFARI_PROJECT_DIR="safari" \
npm run build:safari:macos
功能
使用说明
如果你使用过原插件,你会发现在核心功能和交互上,本插件基本没有做出大的改动。可以先参照原插件的使用方法尝试使用。
可以先在这个示例视频上试一试精准空降的快乐!
视频使用说明正在计划制作中。
相比原插件变化
-
放弃了多语言支持,只支持简体和繁体中文。
-
放弃了移动端H5网页支持。
-
放弃了第三方镜像站支持。如果有使用人数多的镜像站,欢迎讨论添加支持。
-
加入了绑定搬运视频的功能。绑定的视频可以自动从 SponsorBlock 数据库中获取片段信息。
-
更新 UI。
功能更新计划
服务端及数据
为了方便大家二次开发,所有片段的数据现在开放下载:https://download.bsbsb.top/database.zip
API
API文档:https://github.com/hanydd/BilibiliSponsorBlock/wiki/API
测试视频 BV14741127BN
本项目对 API 改动不大,也可以先参考原项目文档。
搭建项目
致谢
感谢ajayyy创造的SponsorBlock给我的启发!
开源协议
本项目遵循 GNU GPL v3 开源协议。
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicensecopyleft/unknown — index-and-link only
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-ce0c96b14d952026-08-06