DEV Community

Prosper Ughakpoteni
Prosper Ughakpoteni

Posted on

I built a Chrome extension that mutes YouTube ads automatically — and I need contributors.

I'm a 19-year-old AI student studying in China. Like most students, I spend a lot of time on YouTube — lectures, tutorials, background music while I study. And like everyone, I got tired of YouTube ads blasting at full volume right in the middle of a focused session.

So I built Quietly.

What it does

Quietly is a Chrome extension that automatically detects when a YouTube ad is playing and mutes it in real time — then restores your audio the moment the ad ends. No clicking. No manual muting. It just works silently in the background.

  • Automatically mutes YouTube ads
  • Restores audio when the ad ends
  • Works across multiple YouTube tabs simultaneously
  • Persists ON/OFF state across browser sessions
  • Runs entirely client-side — no servers, no data collection

How it works under the hood

The extension uses DOM monitoring to detect ad state. Every 500ms, content.js checks for the presence of ad-specific elements in the YouTube player. When an ad is detected, it mutes the tab. When the ad clears, audio is restored.

The trickiest part was getting the mute/unmute timing right. YouTube's ad transitions aren't instant — there's a window where the ad has technically ended but the player hasn't fully switched back to normal video. Get the timing wrong and you either cut off the first second of the video or let the tail end of the ad play at full volume. It took several iterations of testing to nail the detection logic reliably.

Message flow

User clicks Enable/Disable in popup
→ popup.js sends message to background.js
→ background.js updates Chrome storage
→ background.js notifies all open YouTube tabs
→ content.js reacts and starts/stops muting
Enter fullscreen mode Exit fullscreen mode

The stack

Just vanilla JavaScript, the Chrome Extensions API (Manifest V3), and Chrome storage. No frameworks, no dependencies. The whole thing is lightweight by design.

Why I'm open sourcing it

I use this extension every single day on my local machine. It genuinely solves a problem I have. But I'm an AI student, not a frontend specialist — and there are parts of this project that deserve better than what I've built so far.

Specifically, I'm looking for help with:

  • UI/popup improvements — the popup works but it's minimal. Better design, clearer state feedback, a mute counter
  • Better ad detection logic — YouTube changes its DOM structure regularly, which can temporarily break detection. Smarter, more resilient selectors would make this much more robust
  • Bug fixes — there are known edge cases, especially around tab switching and YouTube's single-page navigation

Get involved

The repo is open and I've already filed issues with good first issue and help wanted labels — so if you're also looking to build your open source contributions (like I am), this is a good place to start.

GitHub: github.com/Prosperteni/Quietly

If you've ever been startled by a loud YouTube ad mid-focus session, you already understand the problem this solves. Come help make it better.


Built by an AI student who just wanted to study in peace.

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy 🎖️

Isn't this problem already solved with ad-blockers?

Collapse
 
prosperteni profile image
Prosper Ughakpoteni

Yes, ad blockers exist. Quietly is for people who want to support creators but not get blasted with audio mid-study session — and for anyone who just wanted to learn how Chrome extensions work from the inside.
Good comment @jonrandy