r/learnprogramming • • Oct 13 '17

I created a chrome plugin that automatically mutes youtube commercials

This is a chrome plugin that automatically mutes youtube commercials. After the commercial finished, the volume goes back up.

Thanks to this, casters can still be reworded by youtube, but you don't have to listen to crappy commercials.

https://chrome.google.com/webstore/detail/youmuter/hbhjkldledabllijjmnmfhhiejephibe

and you can checkout the source code here:

https://github.com/adamgajzlerowicz/muter

3.0k Upvotes

228 comments sorted by

View all comments

4

u/everybodysaysso Oct 13 '17

This is good stuff man. It works!!!!

Can you please take out sometime and explain what exactly you did? How do you figure out if a commercial is playing?

5

u/Deseao Oct 13 '17

So if you look at their code the extension is just clicking the mute button when it finds part of the site called 'ad-interrupting' which is apparently conveniently only there when there's an ad.

1

u/everybodysaysso Oct 14 '17

Oh that's pretty straightforward!! Still impressive though.

Thanks for sharing this, I will go through the code too!