MALFunction - "Fix" ERRORS on MAL

When MAL bugs showing ERROR messages or is blank and doesn't load the script reloads the page until MAL is successfully loaded...

目前為 2021-01-25 提交的版本,檢視 最新版本

// ==UserScript==
// @name         MALFunction - "Fix" ERRORS on MAL
// @namespace    MALFunction
// @version      1.0.3
// @description  When MAL bugs showing ERROR messages or is blank and doesn't load the script reloads the page until MAL is successfully loaded...
// @author       hacker
// @match        https://myanimelist.net/*
// @icon         https://www.google.com/s2/favicons?domain=myanimelist.net
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  if (document.querySelector("body").innerHTML.length < 3100 && document.body.innerText.search('Please click "Submit" to verify that you are not a bot.') === -1) {
    location.reload(); //Reloads the page
  }
  if (document.body.innerText.search('Please click "Submit" to verify that you are not a bot.') > -1) {
    document.querySelector("button.g-recaptcha").click(); //Auto click on the submit button
  }
  if (document.querySelector("title").innerText === "500 Internal Server Error" || document.querySelector("title").innerText === "504 Gateway Time-out" || document.querySelector("title").innerText === "ERROR: The request could not be satisfied") {
    location.reload(); //Reloads the page
  }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址