<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi" -->

---
title: YouTube Ad Punisher – Auto-reloads YouTube pages when an...
description: YouTube Ad Punisher is an MIT-licensed Manifest V3 Chrome extension that reloads a YouTube page the moment an ad starts, so the ad slot is usually empty after...
canonical: https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays | daily.dev
og:description: YouTube Ad Punisher is an MIT-licensed Manifest V3 Chrome extension that reloads a YouTube page the moment an ad starts, so the ad slot is usually empty after...
og:url: https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi
og:image: https://api.daily.dev/og/posts/rOEdXQSgI.png
og:image:alt: YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays

**[Hacker News](https://daily.dev/sources/hn)** · 6 min read · 0 upvotes · 0 comments

## Summary

YouTube Ad Punisher is an MIT-licensed Manifest V3 Chrome extension that reloads a YouTube page the moment an ad starts, so the ad slot is usually empty after one or two reloads. It saves your playback time and restores it through a `&t=Xs` URL parameter. Detection polls every 500ms and uses a MutationObserver for the `.ad-showing` class, skip buttons and overlays. After 3 reloads it switches to a helper tab for 4 seconds, and if reloads still fail after 3 attempts it redirects to the yout-ube.com mirror. It logs every ad locally and exports JSON or CSV.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://github.com/antonpictures/youtube-punisher>

## Questions this post answers

### How can I skip YouTube ads without a traditional ad blocker that YouTube's anti-adblock detects?

One approach is an extension that detects an ad, saves video.currentTime, and reloads the page with a `&t=Xs` URL parameter so YouTube seeks back to your position. After one or two reloads the ad slot is typically empty. It is client-side and uses no filter lists or network blocking, so anti-adblock has nothing to detect.

_Developers who build browser extensions follow workarounds like this on daily.dev._

### What does a Manifest V3 Chrome extension need to detect YouTube ads and avoid reload loops?

Detection polls every 500ms and uses a MutationObserver to watch for the `.ad-showing` class, skip buttons and ad overlays. A 3-second cooldown guard prevents reload loops. The extension needs only the `storage` and `tabs` permissions, limited to YouTube domains. YouTube changes DOM class names periodically, so detection may break and need updating.

_Anyone maintaining extensions against changing site DOMs can keep up on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 222 comments across hackernews (as of 2026-11-26).

**TL;DR:** The discussion barely engages with the tool itself and instead spirals into a long debate about YouTube ad-blocking in general, Chrome's Manifest V3, Premium pricing, and Google's broader business practices.

**Sentiment:** 20% positive · 35% mixed · 45% skeptical

**The case for**

- Some note that existing ad-blockers like uBlock Origin plus SponsorBlock already handle ads effectively without needing a reload-based workaround.
- A few see reload-based approaches as a clever, low-effort way to deny ad impressions to the platform.

**The pushback**

- Many argue the extension is unnecessary since uBlock Origin (especially on Firefox) already blocks YouTube ads without issue.
- Some report that ad-blocking causes YouTube to throttle/buffer video or show 'Experiencing Interruptions' messages, making the experience worse.
- Concerns raised about trusting small browser extensions in general, since maintainers can be bought out or extensions can later add tracking/malicious code.
- Several commenters note Chromebook users can't easily use ad blockers at all, limiting the tool's usefulness on that platform.

**By community**

- hackernews (heated): Conversation fractures into tangents about ad-blocking efficacy, Manifest V3, extension trust, YouTube Premium pricing, and Google's business practices, with little direct discussion of the submitted tool.

**Hottest debate:** Whether paying for YouTube Premium is worthwhile versus continuing to rely on ad-blocking tools and tolerating Google's practices.

**Open questions**

- Does this reload-based approach actually work reliably compared to established ad blockers like uBlock Origin or AdGuard?
- Does triggering repeated reloads affect ad billing/impressions in a way that meaningfully hurts advertisers or YouTube?
- How will this extension hold up against YouTube's evolving anti-adblock detection over time?

**Highlights**

> Is this actually an issue? Using uBlock Origin on firefox I don't think I have seen a youtube-forced ad in YEARS. And then adding in the SponsorBlock extension gets me around anything embedded into the video itself. SponsorBlock is actually awesome, and for those that like to see internet numbers go up, it tells you how much your own submissions have saved other users over the years (the 11 snippets I've added have helped others skip 20d of ads).
> — [noitpmeder on hackernews · 12 comments](https://news.ycombinator.com/item?id=50657695)

> Jumping on this to add an additional warning: Just because an extension starts out safe does not mean it will always remain that way. This has been mentioned numerous times before on hacker news, but maintainers of any mildly to moderately popular browser extension are routinely offered tantalizingly high sums of money to either sell the extension to a less scrupulous third-party or to add data collection code for said third-party. You are never 100% safe, but dramatically limiting the scope of what you trust is a great step in the right direction. I use two and only two browser extensions (uBlock Origin and Bitwarden) everywhere I go, and I have zero issues with ads on YouTube (or anywhere else, really). Edit: I should also clarify that I am not speaking negative of this particular extension at all, nor the work that has gone into it.
> — [wilkystyle on hackernews · 6 comments](https://news.ycombinator.com/item?id=50658921)

> Considering the name, I wonder if part of the goal is to punish the advertisers. Perhaps when an ad is blocked no one pays, but if it loads and the page is refreshed, they pay for something you have not watched. I’m speculating. I don’t know if that’s how YouTube’s ad system works.
> — [latexr on hackernews · 1 comments](https://news.ycombinator.com/item?id=50659262)

> Yes, in a sense. Youtube seems to do a lot of A/B testing over very long time frames so your experience could be completely different than other people's. I've never had an ad get past the ad blocker but I've had a lot of fake-buffering and videos refusing to play that makes the site unusable over the past 1-2 years. I remember people telling me about this for months and I had no idea what they were talking about until one day they targeted my account as well.
> — [dns\_snek on hackernews · 1 comments](https://news.ycombinator.com/item?id=50658202)

> Google removed support for Manifest v2 extensions from Chrome a little while back, which were much more useful for content blocking. Ad blockers on Chrome aren't as capable as those on Firefox these days.
> — [ryukafalz on hackernews · 3 comments](https://news.ycombinator.com/item?id=50657910)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50657530) · 141 points · 222 comments

## Similar posts on daily.dev

- [Amazing Refresh — A Malicious Chrome Extension Running Malware in the Browser](https://daily.dev/posts/amazing-refresh-a-malicious-chrome-extension-running-malware-in-the-browser-jlxakhzub) · Scott Helme · 0 upvotes · 0 comments
- [DuckDuckGo browser now blocks YouTube video ads](https://daily.dev/posts/duckduckgo-browser-now-blocks-youtube-video-ads-v7x8v6gio) · BleepingComputer · 262 upvotes · 30 comments
- [Ad blocking alive and well, despite changes to Chrome](https://daily.dev/posts/ad-blocking-alive-and-well-despite-changes-to-chrome-2uxgvalxx) · The Register · 2 upvotes · 0 comments
- [surprisetalk/AdBoost: AdBoost is the only browser extension that adds ads to web pages\!](https://daily.dev/posts/surprisetalk-adboost-adboost-is-the-only-browser-extension-that-adds-ads-to-web-pages--40gvtc0mo) · Hacker News · 0 upvotes · 0 comments
- [A tiny Docker container mutes YouTube ads and skips the sponsors on all my TVs, and I didn't have to replace the app](https://daily.dev/posts/a-tiny-docker-container-mutes-youtube-ads-and-skips-the-sponsors-on-all-my-tvs-and-i-didn-t-have-to-pdgkzkzwv) · XDA Developers · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays","url":"https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi"},"datePublished":"2026-11-26T20:37:20.644Z","dateModified":"2026-11-26T21:53:22.842Z","description":"YouTube Ad Punisher is an MIT-licensed Manifest V3 Chrome extension that reloads a YouTube page the moment an ad starts, so the ad slot is usually empty after...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bccef100ff4fa827b0cae8d517e01914?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/bccef100ff4fa827b0cae8d517e01914?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"YouTube Ad Punisher – Auto-reloads YouTube pages when an ad plays"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/youtube-ad-punisher-auto-reloads-youtube-pages-when-an-ad-plays-roedxqsgi#faq","mainEntity":[{"@type":"Question","name":"How can I skip YouTube ads without a traditional ad blocker that YouTube's anti-adblock detects?","acceptedAnswer":{"@type":"Answer","text":"One approach is an extension that detects an ad, saves video.currentTime, and reloads the page with a `\u0026t=Xs` URL parameter so YouTube seeks back to your position. After one or two reloads the ad slot is typically empty. It is client-side and uses no filter lists or network blocking, so anti-adblock has nothing to detect. Developers who build browser extensions follow workarounds like this on daily.dev."}},{"@type":"Question","name":"What does a Manifest V3 Chrome extension need to detect YouTube ads and avoid reload loops?","acceptedAnswer":{"@type":"Answer","text":"Detection polls every 500ms and uses a MutationObserver to watch for the `.ad-showing` class, skip buttons and ad overlays. A 3-second cooldown guard prevents reload loops. The extension needs only the `storage` and `tabs` permissions, limited to YouTube domains. YouTube changes DOM class names periodically, so detection may break and need updating. Anyone maintaining extensions against changing site DOMs can keep up on daily.dev."}}]}
```

