VideoAdGuard is a Chrome, Edge, and Firefox extension that uses a large language model to detect sponsored segments in Bilibili videos and skip them.
- v2.0.1
- Published at
- 2d ago
- 791
- Stars
- 172
- Download
Latest release
v2.0.1Dec 3, 2026, 06:14 AMDownloads slow? Switch the source anytime above
README
Project Overview
When you watch a video on Bilibili and want to get past the sponsored segment in the middle, VideoAdGuard offers a model-driven way to find it and skip it. It reads the subtitles, title, and pinned comment, asks a large language model which spans are promotional, then draws those spans on the player. Version 1.4.3 is a Manifest V3 extension written in TypeScript and bundled with Webpack.
| Item | Value |
|---|---|
| Platform | Chrome, Edge, Firefox extensions |
| Current version | 1.4.3, Manifest V3 |
| Language | TypeScript, bundled with Webpack |
| License | GPL-2.0-or-later |
| Dependencies | openai ^6.34.0, @anthropic-ai/sdk ^0.92.0, @typesafe-ai/sdk ^0.7.0 |
The model makes the call, the viewer keeps the skip button.
Supported Hosts
- Chrome: a Manifest V3 build whose content script covers video, festival, and watch-later pages
- Edge: shares the same build output as Chrome and loads directly
- Firefox: declares
browser_specific_settingswithstrict_min_version109.0 - Match patterns:
*://*.bilibili.com/video/*,/festival/*, and/list/watchlater*
Key Features
- Subtitle detection: submits subtitles, title, and pinned comment together so the model can locate promotional spans
- Audio detection: for videos without subtitles, downloads the audio stream and transcribes it with Groq Whisper first
- Skip button: shows a skip entry at the bottom right of the player and jumps to the main content
- Timeline marks: draws ad spans in red on the progress bar, and a click toggles a span on or off
- Span editing: drag an edge to change the start or end time, drag the middle to move the whole span
- Two thresholds: subtitles at 0.5 probability or above form the core, and contiguous neighbours at 0.2 or above are merged
- Local cache: stores results by video BV id for 24 hours, so a revisit skips the model call
- Cloud cache: optionally reads the shared record
ad:{bvid}, and a user correction is stored withsource: user - UP whitelist: creators on the whitelist are excluded from detection
Quick Start
Install from a Store
- Install VideoAdGuard from the Chrome, Edge, or Firefox add-on store
- Click the toolbar icon to open the settings page
- Pick OpenAI compatible, Anthropic compatible, System One, or custom fetch in the SDK list
- Fill in the base URL, API key, and model name; for OpenAI compatible endpoints a base ending at
/v1is enough - Open any Bilibili video with subtitles and wait for detection to finish
- Click the skip button once it appears, or adjust the red span on the progress bar
Build Locally
- Clone the repository and run
npm install - Run
npm run build, then loadbuilds/chromeorbuilds/firefoxwith developer mode enabled
Permissions and Data
- Declared permissions:
storage,tabs, andactiveTab, with*://*/*host permission for cross-origin subtitles and model calls - Local storage: cache entries live in extension storage and are removed by a cleanup task after one day
- Key handling: the API key stays in the browser and is sent only to the model endpoint you configure
- Cloud fallback: cloud cache requests go through a Cloudflare Worker and silently fall back to local detection
Notes
- Model quality drives results: you supply your own API key, stronger models judge better, and paid endpoints bill per token
- Context limit: the whole subtitle list is submitted at once, and input past the service limit returns an error
- Local model CORS: endpoints such as Ollama need an origin allowance, for example
OLLAMA_ORIGINS=* - Audio costs extra: Groq Whisper needs a separate key and may require a special network path
- Build environment: local builds need Node.js 22 or newer and TypeScript 5
Release history
Sort