NOTICE: By continued use of this site you understand and agree to the binding 利用規約 and プライバシーポリシー.
Install steps: Install a userscript manager, select Install, then open a website matched by the script.
The following figures come from the original source and are separate from activity on this site.
Original script: Twitch Ad Remover
Source version: 1.1.1
Last source check:
Last successful check:
Requests received by this site are not proof that a user completed installation.
Clicking Install records a request on this site; it does not confirm installation. Not working after install? View troubleshooting and issues
Removes advertising from Twitch.tv, including the ads that play inside the video player.
Unlike a normal content blocker, this does not simply hide the ad — it replaces the advertised stream with a clean one before the player ever receives it. You keep watching the broadcast without an interruption, a black screen, or a mute.
Twitch uses server-side ad insertion (SSAI). Ads are not separate requests to a separate ad server; they are spliced directly into the HLS manifest as ordinary video segments, on the same CDN, indistinguishable at the network level from the stream itself.
A filter list has nothing to block. A cosmetic rule has nothing to hide. By the time the ad is visible, it is already part of the video the player is decoding.
Twitch's player runs its HLS logic inside a Web Worker. This script overrides window.Worker at document-start, reads the worker's bootstrap blob, and injects its own fetch hook ahead of the original worker code.
Inside the worker:
.m3u8 playlist is inspected for stitched-ad markers before it reaches the player.PlaybackAccessToken is requested through Twitch's GraphQL API with platform: "ios" and an alternate playerType. Twitch does not apply the same ad stitching policy to every platform and player type combination.Because the substitution happens upstream of the player, no ad segment is ever buffered or rendered.
Supporting behaviour:
Client-ID, Client-Integrity, Client-Version, Client-Session-Id, Device-ID, Authorization) are harvested from the page's own requests and forwarded to the worker, so token requests carry valid credentials and pass integrity checks.picture-by-picture probes are suppressed, since they retrigger mid-roll logic.The playlist interceptor runs inside a guarded block. Any unhandled error falls through to the browser's own fetch, and after five consecutive failures the hook disables itself for the remainder of the session.
This is deliberate. When Twitch changes something upstream, the script degrades to ads play normally — never to a black or frozen player.
If another Twitch ad blocking script is already active, this one detects it through the shared window.twitchAdSolutionsVersion marker and stands down rather than competing with it. Running two at once makes both less effective.
Substituting a stream leaves the player holding a stale buffer, and live latency drifts. The script checks latency every 30 seconds, on tab focus, and after each ad break, and performs a pause/play cycle to reseek to the live edge when latency exceeds the threshold — 5 seconds in low-latency mode, 15 seconds otherwise.
A 30-second cooldown prevents repeated cycling, and VODs, clips and collections are excluded.
Console output uses labelled badges: script name, level, and source context.
AdRemover INFO Page v1.1.1 active, playerTypes: embed → site → autoplay
AdRemover OK Worker Clean stream via playerType "embed"
AdRemover WARN Worker Token request failed (403), retrying in 4s
AdRemover INFO Player Latency 18.4s exceeded 15s, resynced to live edge
Levels are debug, info, ok, warn, error. Contexts are Page, Worker, Player, Net. Worker-side events are relayed to the page so everything lands in one console.
Set logLevel to 'debug' when reporting a problem, or 'silent' to suppress output entirely.
Edit the CFG object at the top of the script.
| Option | Default | Purpose |
|---|---|---|
playerTypes |
['embed', 'site', 'autoplay'] |
Player types tried, in order, when requesting a clean stream. |
encodingCacheTimeout |
60000 |
How long (ms) a fetched master playlist is reused before requesting a new token. |
stickyPlayerType |
true |
Remember and reuse the last working player type. |
tokenBackoffBase |
2000 |
Initial backoff (ms) after a failed token request. |
tokenBackoffMax |
60000 |
Backoff ceiling (ms). |
maxConsecutiveErrors |
5 |
Errors tolerated before the hook disables itself for the session. |
consumeAdSegment |
true |
Requests one ad segment to mark the pod consumed, which reduces pre-roll frequency. |
hideBannerAds |
true |
Injects CSS to hide display ads and ad overlays. |
blockAdNetworks |
true |
Blocks requests to third-party ad domains. |
spoofPageVisibility |
true |
Prevents Twitch pausing playback in background tabs. |
yieldToOtherBlockers |
true |
Stand down if another Twitch ad blocking script is already active. |
latencyCorrection |
true |
Resync to the live edge when latency drifts. |
latencyThreshold |
15 |
Latency (s) tolerated in standard mode. |
latencyThresholdLowLatency |
5 |
Latency (s) tolerated in low-latency mode. |
latencyCheckInterval |
30000 |
How often (ms) latency is checked. |
latencyCooldown |
30000 |
Minimum gap (ms) between corrections. |
logLevel |
'info' |
One of debug, info, ok, warn, error, silent. |
The metadata block uses @grant none and @run-at document-start. Both matter: the script must run in page context and must install its Worker override before Twitch instantiates its player. Do not change them.
m.twitch.tv) is not supported.Set logLevel: 'debug' first. Most of the answers below are visible in the console.
Ads are back.
Twitch periodically closes the player-type loopholes. Try reordering or extending playerTypes — embed, site, autoplay, thunderdome, and frontpage have all worked at different times. Repeated WARN lines about failed token requests point at the GraphQL side; no warnings but ads still playing points at the player types themselves.
The script logged that it disabled itself.
An ERROR line naming the failure means five consecutive interception errors. Reload the page to reset. If it recurs immediately, the technique has been patched and the script needs updating — the error text is the useful part of a bug report.
Nothing is logged at all.
The worker hook did not install. Most likely another Twitch ad blocker is running and this one stood down — check for the WARN about the version marker. Do not run two at once.
The stream drifts behind live.
Latency correction should handle this. If it is too aggressive or not aggressive enough, adjust latencyThreshold and latencyThresholdLowLatency. Set latencyCorrection: false to disable it.
Playback works but quality dropped. The substitute stream may not offer an identical encoding ladder. The script matches resolution and frame rate where possible and falls back to the closest available.
Some tools in this space report ads as viewed after blocking them, by sending synthetic impression and quartile-completion events. This script does not, and will not. Blocking an ad is one thing; falsifying the telemetry that advertisers are billed against is another.
This is an arms race, and the script is on the losing side of it by design. Twitch can change its ad delivery server-side, with no deployment on your end, and break every tool of this kind simultaneously. Expect periods where ads play normally until the technique is updated. Nothing here is permanent.
The stream-substitution approach — worker fetch hooking, iOS platform tokens, player-type escalation, and credential forwarding — is derived from pixeltris/TwitchAdSolutions, which remains the reference implementation and the place to check when this stops working.
MIT.
評価: 0