hn.today

YouTube Ad Punisher – Bypass anti-adblock

github.com529 points637 comments
Screenshot of YouTube Ad Punisher – Bypass anti-adblock

YouTube Ad Punisher is a browser extension designed to avoid YouTube ads by reloading a video page when an ad is detected, rather than blocking ad requests or clicking the skip button. It records the video’s current playback time, reloads the page with that position in the URL, then seeks back so playback can resume. Detection uses YouTube page elements such as the ad-showing class, skip buttons, and ad overlays, checked regularly and through a mutation observer. A three-second cooldown is intended to prevent reload loops; if three reloads fail to clear an ad, the extension can redirect to the yout-ube.com mirror.

The project also logs detected ads locally, including advertiser, video title, ad duration, playback position, skip text, and the action taken. Users can view statistics and export the history as JSON or CSV. Its README describes support for Chrome, Brave, Edge, and Opera through an unpacked Manifest V3 extension, and offers an experimental Safari workaround using an AppleScript watcher. Live streams receive a plain reload because playback position may not be recoverable. The creator argues that reloading makes YouTube reconsider whether to serve an ad, while acknowledging that YouTube’s page structure can change and detection may need adjustment. The tool is presented as a supplement to uBlock Origin and SponsorBlock, not a replacement for them.

Read on github.com637 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

European Commission Declares Browser Competition a Digital Markets Act Priority

European Commission Declares Browser Competition a Digital Markets Act Priority

The European Commission says browser competition is a Digital Markets Act priority and is discussing ways for rival browsers to compete effectively with Safari on iPhones and iPads. Open Web Advocacy says its open letter calling for greater browser and web app competition has attracted support from consumer, rights, publishing, startup, and technology groups. (open-web-advocacy.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.