YouTube Mute and Skip Ads

Mutes, blurs and skips ads on YouTube. Speeds up ad playback. Clicks "yes" on "are you there?" on YouTube Music.

< 脚本YouTube Mute and Skip Ads的反馈

提问/评论

§
发表于:2023-03-23

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?

ion1作者
§
发表于:2023-03-24

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.

§
发表于:2023-03-24

I see, I tried some of those, it's so tricky... thx for the reply :)

ion1作者
§
发表于:2023-03-24

np, good luck!

发表回复

登录(不可用)以发表回复。

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址