Auto-reloads YouTube pages when an ad plays — preserving your playback position. Punish the ads.
YouTube serves an ad roughly every 60 seconds. You can't watch one minute of content without being interrupted by a commercial. Traditional ad blockers get detected by YouTube's anti-adblock system ("Ad blockers are not allowed here"). Skip buttons take 5 seconds to appear. You sit there, hostage.
Reload the page. That's it. Two reloads and the ad is gone. Every time.
🎯 YouTube Ad Punisher automates this: the moment an ad appears, it captures your exact playback timestamp, reloads the page, and YouTube auto-seeks back to where you were. No ads. No waiting. No skip button hunting.
-
Auto escape: after 3 reloads, the extension automatically switches to a helper tab for 4 seconds (George's discovery, now automated), then switches back. No manual tab switching needed.
-
Ads keep coming after reload? Switch to another tab for a few seconds, then switch back. Chrome throttles background tabs, which lets the ad state settle — George discovered this works every time.
-
Incognito: see the Incognito section above.
Ad detected → Capture timestamp → Reload page → Auto-seek to timestamp → Resume
↓ (if 3 reloads fail)
Redirect to yout-ube.com (ad-free mirror, no looping)
-
Reload (primary) — reloads the page 1-3 times. YouTube re-evaluates ad serving on each reload; after 1-2 cycles the ad slot is empty and the video plays clean. Timestamp is preserved via
&t=XsURL param + JS seek. -
yout-ube.com redirect (fallback) — if reloads don't clear the ad after 3 attempts, redirects to
yout-ube.com(an ad-free YouTube mirror). The URL includes&loop=0to prevent the infinite replay issue that the mirror has by default. -
Detect — watches for
.ad-showingclass, skip buttons, and ad overlays (every 500ms + MutationObserver) -
Capture — grabs
video.currentTimeand saves it to sessionStorage -
Reload —
location.replace()with&t=Xsin the URL -
Restore — YouTube auto-seeks to the timestamp; playback resumes
-
Cooldown — 3-second guard prevents reload loops
- ✅ Zero ads — reloads until the ad is gone (usually 1-2 cycles)
- ✅ Timestamp preserved — never lose your place in the video
- ✅ Live streams — plain reload (no timestamp to preserve)
- ✅ Ad history database — every ad logged with advertiser, duration, skip text, video, and timestamp
- ✅ Export — JSON or CSV download of all collected ad data
- ✅ Popup viewer — click the extension icon to see stats, top advertisers, and full history
- ✅ No permissions abuse — only
storageandtabs, only on YouTube domains
- Clone the repo:
git clone https://github.com/antonpictures/youtube-punisher.git
- Open
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked → select the
youtube-punisherfolder - Done — activates on all YouTube pages automatically. ✅ Tested
Safari blocks ad-hoc signed extensions from auto-injecting into YouTube. As a workaround, use the JS overlay + AppleScript watcher (yt-ad-watch.sh):
- In Safari, enable: Safari → Settings → Advanced → Show Develop menu in menu bar
- In Safari (on a YouTube page), run
./yt-ad-watch.shin Terminal - When an ad appears, the watcher detects it via MutationObserver (event-driven in the page), reloads with
&t=Xs, and the MutationObserver re-detects on the next page load
Note: This is best-effort. Chrome is fully reliable; Safari works but may need manual testing.
- Download the latest release from Releases
- Unzip and follow Option A steps 2–5
Every ad YouTube serves you is recorded:
| Field | What it captures |
|---|---|
| Timestamp | When the ad was detected |
| Advertiser | Company name from the ad overlay |
| Video | Title of the video you were watching |
| Video time | Your playback position before reload |
| Ad duration | Length of the ad |
| Skip text | "Skip Ad" button text (if available) |
| Action | Reloaded or skipped |
Export as JSON or CSV from the popup. Data stays local — nothing is sent anywhere.
YouTube's ad system serves ads as part of the page load. When you reload, YouTube re-evaluates whether to serve an ad based on your session state. After 1-2 reloads, the ad slot is typically empty and the video plays directly. This is a client-side, zero-cost workaround — no filter lists, no network blocking, no detection by YouTube's anti-adblock system.
If millions of users did this, each reload = a full page load = server request. YouTube would see a spike in page loads but a drop in ad impressions. It's not a DDoS (no amplification, no botnet), but it's a passive protest: every reload is a vote that says "I will not watch your ad." The ad revenue model breaks when reloads are cheaper than ad views.
"Every reload is a vote: I will not watch your ad." — George Anton, creator
| Tool | How it works | Reloads? | Collects data? |
|---|---|---|---|
| uBlock Origin | Blocks ad network requests | No | No |
| SponsorBlock | Skips sponsored segments in videos | No | No |
| Enhancer for YouTube | Auto-clicks "Skip Ad" button | No | No |
| 🎯 YouTube Ad Punisher | Detects ad → reloads → seeks to timestamp | Yes | Yes |
| Popup blockers | Block window.open() popups |
No | No |
Best combo: uBlock Origin (blocks most ads) + 🎯 YouTube Ad Punisher (catches the ones that slip through and logs them) + SponsorBlock (skips sponsor reads). They don't conflict.
- YouTube changes DOM class names periodically — if ads aren't detected, check the console for
[YT-AdReloader]logs - Some ads (mid-roll on live streams) can't preserve position — plain reload
- YouTube's "Premium" upsell interstitials may need a second reload cycle (handled by cooldown)
| File | Purpose |
|---|---|
manifest.json |
Chrome extension manifest v3 |
content.js |
Ad detection + reload + timestamp restore + history tracking |
popup.html / popup.js |
Ad history viewer with export |
background.js |
Minimal service worker |
MIT — do whatever you want with it.
Built with Alice (SIFTA) for George Anton.
"If millions installed this, YouTube would feel every reload." 🐜