Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch AdBlock

Chrome Web Store

Install: chromewebstore.google.com/detail/twitch-adblock

A lightweight Chrome extension (Manifest V3) that blocks video ads on Twitch at the stream level — before ads reach the player.

Built on the proven VAFT engine from TwitchAdSolutions (MIT License).

Manifest V3 License Chrome

Features

  • Blocks pre-roll and mid-roll video ads on Twitch live streams
  • Injects at document_start — hooks Twitch workers before the player initializes
  • Simple on/off toggle from the toolbar popup
  • No remote code — all logic is bundled locally
  • Open source and free to use

How it works

Twitch serves video through HLS workers that fetch .m3u8 playlists. VAFT intercepts that pipeline:

  1. Worker hook — replaces window.Worker to inject ad-blocking logic into Twitch's workers
  2. Playlist inspection — detects ad segments in .m3u8 manifests
  3. Clean stream fallback — requests ad-free backup player variants when needed

Installation

Install the extension from the Chrome Web Store, then reload any open Twitch tabs.

Build from source

  1. Clone this repository:
    git clone https://github.com/VERAS1508/TwitchADBlock.git
  2. Open Chrome and go to chrome://extensions
  3. Enable Developer mode (top right)
  4. Click Load unpacked and select the project folder
  5. Reload any open Twitch tabs

Verify it is working

  1. Open a Twitch stream
  2. Open DevTools (F12) → Console
  3. Look for hookWorkerFetch (vaft) — this confirms VAFT is active

Usage

Click the extension icon in the toolbar to open the popup.

Setting Behavior
Block video ads (on) VAFT injects on Twitch page load
Block video ads (off) No injection; open Twitch tabs reload automatically

Compatibility

Do not run this extension alongside other Twitch-specific ad blockers that hook window.Worker, including:

  • AdGuard Extra
  • Tampermonkey / Violentmonkey with VAFT or TwitchAdSolutions scripts
  • Other VAFT-based Twitch extensions

Running multiple worker-level blockers can cause infinite loading screens or playback freezes. Pick one solution.

General ad blockers (uBlock Origin filter lists, AdGuard without Extra) are usually fine, but avoid duplicate Twitch scripts.

Updating VAFT

The bundled engine lives in src/vaft.js. To update from upstream:

  1. Download the latest vaft.user.js
  2. Remove the userscript header (// ==UserScript==// ==/UserScript==)
  3. Save as src/vaft.js
  4. Reload the extension on chrome://extensions

Project structure

TwitchADBlock/
├── manifest.json       # Extension manifest (MV3)
├── background.js       # Reloads Twitch tabs on toggle change
├── src/
│   ├── content.js      # Storage check + page-context injection
│   └── vaft.js         # VAFT ad-blocking engine (bundled)
├── popup/              # Toolbar popup UI
├── icons/              # Extension icons
├── LICENSE
├── PRIVACY.md
└── README.md

Known limitations

  • Twitch may change its player — VAFT updates may be required periodically
  • Occasional buffering or freezing is a known upstream VAFT behavior; mitigation is built in
  • Not a replacement for Twitch Turbo or channel subscriptions
  • Squad streams are not supported by VAFT
  • Use at your own discretion; review Twitch's Terms of Service

License

MIT — see LICENSE.

Ad-blocking logic is derived from TwitchAdSolutions (MIT License). Credit to the TwitchAdSolutions contributors and the original VAFT authors.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Twitch Interactive, Inc. It is provided as-is without warranty.

About

Chrome extension that blocks video ads on Twitch.tv using the VAFT stream-level ad-blocking engine.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages