This mini project stems from a story...
Once upon a time, in a faraway place...
there was a very skilled cook who wanted to cook while listening to YouTube, but advertisements and waiting times for clicks, prevented her from enjoying the content in peace.
So, the husband, seeing his wife enslaved by those clicks, decided to automate the process, and they all lived happily ever after.
Jokes aside, it's important to make a premise:
there are valid applications like Ad Block that perform this task excellently, but a rainy day and boredom led me to think of an alternative solution in which Ads are not blocked but 'accelerated'.
It's essential to explain that this code only functions in the presence of another very valid extension: Video Speed Project.
When you are on YouTube, the system detects DOM mutations with an observer and identifies the advertisement banner.
In that moment, the video playback speed is increased by about x2.5, and the Ad is hardly perceived but still executed.
In the presence of the "SKIP AD" button, however, the system immediately clicks it.
Using popup you can follow history:
- Chrome DOCS for Extensions
- Chrome DOCS to start develop Extensions
- Remember that the correct structure for an Extansion is: