Mutes, blurs and skips ads on YouTube. Speeds up ad playback. Clicks "yes" on "are you there?" on YouTube Music.
< Feedback on YouTube Mute and Skip Ads
Unfortunately there is no native event for the URL changing that I'm aware of. You could figure out an element which changes every time the YouTube page changes and use a MutationObserver. You could even use a hacky function which checks the URL for changes periodically. Or you could perhaps patch history.pushState and history.replaceState before the YouTube app loads and additionally watch for popstate events.
I see, I tried some of those, it's so tricky... thx for the reply :)
np, good luck!
nice script, btw I also use SponsorBlock to stop Youtube ads
Since you made some Youtube scripts, I was wondering if you know how to detect page changes on YouTube. The problem I'm having is Youtube uses SPF code and usual userscript code like 'spfdone' or 'load' doesn't detect page loads. How do you deal with it?