Greasy Fork

Greasy Fork is available in English.

Netflix Marathon

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

当前为 2018-11-23 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Netflix Marathon
// @namespace    https://ran.su/
// @version      1.6
// @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.de/gp/video/*
// @include      https://www.amazon.*/gp/video/*
// @include      https://www.amazon.*/gp/product/*
// @grant        none
// @license MIT
// ==/UserScript==
var count = 0;

function find() {
  if (count === 0) {
    if (document.getElementsByClassName('skip-credits').length !== 0) {
      //console.log('Found credits.');
      document.getElementsByClassName('skip-credits')[0].firstElementChild.click();
      count = 40;
      //console.log('Found credits. +4s');
      //window.clearInterval(intervalId);
    }
    else if (document.getElementsByClassName('postplay-still-container').length !== 0) {
      //console.log('Found autoplay.');
      document.getElementsByClassName('postplay-still-container')[0].click();
      count = 5;
    }
    else if (document.getElementsByClassName('WatchNext-still-container').length !== 0) {
      //console.log('Found autoplay.');
      document.getElementsByClassName('WatchNext-still-container')[0].click();
      count = 5;
    }
    else if (document.getElementsByClassName('countdown').length !== 0) {
      //console.log('Found Amazon video next.');
      document.getElementsByClassName('countdown')[0].click();
      count = 5;
    }
    else if (document.getElementsByClassName('adSkipButton').length !== 0) {
      //console.log('Found Amazon skip ad.');
      document.getElementsByClassName('adSkipButton')[0].click();
      count = 5;
    }
    else if (document.getElementsByClassName('skipElement').length !== 0) {
      //console.log('Found Amazon skip intro.');
      document.getElementsByClassName('skipElement')[0].click();
      count = 5;
    }
    else {
      //console.log('404 keep looking.');
    }
  }
  else {
    count--;
  }
}

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