9anime Auto Enabler

Automatically enables the 9anime website default auto play and auto next options.

目前为 2022-06-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         9anime Auto Enabler
// @namespace    https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version      1
// @description  Automatically enables the 9anime website default auto play and auto next options.
// @author       hacker09
// @include      https://9anime.*/*
// @icon         https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://9anime.to&size=64
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  window.onload = setTimeout(function() {
    if (document.querySelectorAll("i.fa.fa-square").length === 2) //If both auto options are disabled
    { //Starts the if condition
      document.querySelector("div.ctl.onoff.desktop").click(); //Enable Auto Play
      document.querySelectorAll("div.ctl.onoff.desktop")[1].click(); //Enable Auto Next
    } //Finishes the if condition
  }, 0)();
})();