Greasy Fork

Greasy Fork is available in English.

Skip Amazon Prime Video Ads

This script skips primevideo ADS

< 脚本 Skip Amazon Prime Video Ads 的反馈

评价:一般 - 脚本能用,但还有一些问题

dgw
§
发布于:2021-12-20

I have tweaked this to cancel its interval function once the skip button has been clicked, to remove any background performance impact once the main video content has started.

(function() {
    'use strict';
    let handlerID = setInterval(
        function(){
            if(document.querySelectorAll('.adSkipButton.skippable').length){
                document.querySelector('.adSkipButton.skippable').click();
                clearInterval(handlerID);
            }
        }
        ,100);
})();

发布留言

登录以发布留言。