Skip "Youtube Shorts" Ads Macro (v11.0.2)

Yesterday I noticed that "Youtube Short" videos now have an ad inserted every few videos. I had never seen ads before in this format. So I decided to write a KM macro that skips the ads. This macro is only for "Shorts" videos, not regular Youtube videos.

Skip "Youtube Shorts" Ads Macro (v11.0.2)

Skip "Youtube Shorts" Ads.kmmacros (6.4 KB)

No doubt Youtube will change its interface from time to time, so don't expect this macro to work forever.

I tested it for a few hours and I noticed one small problem. Occasionally (rarely) the active frame in Safari is changed. That means the macro stops working until you click in the main frame. Yes, I could patch that with a kludgey mouse click, but I would prefer to solve this a better way. I can think of three different ways to solve the problem, but they are all annoying. I'm trying to think of a simple and reliable way.

In case it's not obvious, the Semaphore action prevents duplicate copies from running at the same time, and the Pause action prevents the macro from re-running while the scroll animation occurs.