Youtube Chrome Extension

1/23/2026


The problem

If you have a problem, why not solve it yourself. I had a YouTube problem. I love to use YouTube to learn and watch tutorials and other videos, but when I did that, I would go down YouTube rabbit holes going from video to video. On my phone I was able to uninstall YouTube. But then I just moved to my computer. On my computer I tried extensions that blocked everything except for the search bar and the video. But what ended up happening was I’d search for something on YouTube and then watch a video and then go back to the search page and watch another. The search page sometimes just shows recommended videos that aren’t super related to my search but would suck me in. So, I realized I needed something that wouldn’t even show the search bar. I couldn’t find anything, so I learned how to program chrome extensions and made an extreme distraction blocker.

The solution

The chrome extension has 3 main features; it redirects from non-video pages on YouTube, hides everything on the page except the YouTube video, and disables autoplay.

How it works

It checks the current page to see if the page includes youtube.com. If the link also includes watch then we know it’s a video, but if watch isn’t included then we redirect to google.com because it could be a dreaded search page.

Then we go through and hide all elements to the page that I don’t want. I just took the nuclear approach and got rid of everything on the page.

Lastly, there’s a pesky feature on YouTube that sucks me in called autoplay. I hid the icon in the last step, but if autoplay is already on, I also need to disable it. So, I found the autoplay button code, and if it says that it’s on, I click it to turn it off.

If autoplay is disabled, a pesky videowall appears of suggested videos. As a bonus, I added that to my list of things to hide on the page.

View the full code here!

Boom! Now literally everything except for the video on a YouTube page is now gone. After that, I went through the process of putting it on the chrome extension store, which was relatively smooth, and now it’s published to the chrome web store. My personal results have been super successful. My YouTube rabbit holes have essentially been filled in, but I still can google topics and watch videos when I want to.

- Marius