Greasy Fork

来自缓存

Greasy Fork is available in English.

Netflix Marathon

Automatically skip recaps, intros and click nexts on Netflix and Amazon video for you.

当前为 2017-09-17 提交的版本,查看 最新版本

// ==UserScript==
// @name         Netflix Marathon
// @namespace    https://ran.su/
// @version      1.0
// @description  Automatically skip recaps, intros and click nexts on Netflix and Amazon video for you.
// @author       ran
// @include      https://www.netflix.com/*
// @include      https://www.amazon.com/gp/video/*
// @include      https://www.amazon.com/gp/product/*
// @include      https://www.amazon.com/*
// @grant        none
// ==/UserScript==


function find(){
    if (document.getElementsByClassName('skip-credits').length !== 0) {
        //console.log('Found credits.');
        document.getElementsByClassName('skip-credits')[0].firstElementChild.click();
        //window.clearInterval(intervalId);
    } else if (document.getElementsByClassName('postplay-still-container').length !== 0) {
        //console.log('Found autoplay.');
        document.getElementsByClassName('postplay-still-container')[0].click();
    } else if (document.getElementsByClassName('countdown').length !== 0) {
        //console.log('Found Amazon video next.');
        document.getElementsByClassName('countdown')[0].click();
    } else {
        //console.log('404 keep looking.');
    }
}

var intervalId = window.setInterval (find, 150);