For Chrome: type 'chrome://extensions/' in the search bar
Enable 'Developer mode':
Click on 'Load unpacked':
Select the folder you just unzipped and open youtube
Done.
Same process on Edge, except you navigate to "edge://extensions/".
Slight (ms) delay before it skips video ads;
Unskippable ads can only to be sped up;
Line: 84 'player.mute = true' failed for unskippable ads, resulting in a short annoying sound (still better than a whole ad);
The last man standing ad (read below).
→ Update (Feb 8, 24'), known issue with ads not being skipped while having the collapsed (happens when you have a mix/queue running, and you click the youtube logo).
→ Coming to the Chrome Web Store soon!
→ This extension does NOT slow down youtube, like others (e.g. AdBlock) do.
→ Currently only tested on
Chrome, Version 120.0.6099.217
Edge, Version 120.0.2210.133
Both tested in Incognito mode, not logged into an account and with rejected cookies, which resulted in more ads than usual (literally every video). It succesfully skipped all video player ads and removed every single ad element on each page reload/video change. Except the 'Last man standing' ad, which appeared in different page refreshes and remained unskippable. Read more about the 'Last one standing' ad at the bottom of this file.
Also, please note, that I am still new to JS, so please revise the script before using it. And if you figure out a possible improvement/fix, feel free to contribute to the repository by submitting a pull request or opening an issue. Your feedback and contributions are highly appreciated!
There is a slight delay before the script skips/hides the ads.
→ Skips the skippable ads;
→ Mutes and sets the Playback speed of unskippable ads to the maximum (16x);
Update (17 Jan): The first day of using it my self the muting of the unskippable ad worked fine, next day (surprise) it just stopped working.
→ When an unskippable ad is detected, it sets the opacity of the player to 0;
Example of the ad it removes (not how it looks when it's removed, I purposely removed the ad details):
→ Removes ads/sponsored elements from the suggested videos next to the player:
→ Removes ad banners and sponsored videos/ads:
The video ads are nested inside two divs. We select the parent div that holds all children and remove it, but it's inconsistent and doesn't always remove it. The inconsistent result is 'Example 1'. The second (correct) example shows what happens when the script correctly finds the parent div, and once removed, all videos to the right of the ad get shifted to the left and the empty spot is left on the right side of the page:
→ Removes sponsored videos/ads from the search results;
The only video ad it was unable to skip (for me), is this one. It appears after an unskippable ad once in a blue moon.
While testing the extension, It appeared that depending on which 'seed' you land on, you might get this kind of ad after an unskippable ad once every 10-15 ads, or not get it at all.
And by 'seed' I mean, 1 page refresh = different seed. It's weird how I get either unskippable ads every 5 videos, or only skippable ads for like 30 videos, but that might just be me.
Once this ad appeared, the 'skipAd()' function would constantly execute until the ad is skipped by itself, or by the user. So the button is recognized, but for some reason it's not triggering the '.click()' on the button element.
I also noticed that right clicking with my mouse anywhere on this ad wouldn't work as well.
The ad:
I probably skipped through 500-600 ads today. 🤡 Enjoy the extension.