Greasy Fork

Netflix Marathon

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

目前为 2017-09-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         Netflix Marathon
// @namespace    https://ran.su/
// @version      0.7
// @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/*
// @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);