"Not Yet Aired" Hider

Allows you to hide "Not Yet Aired" entries of your list.

目前為 2022-01-28 提交的版本,檢視 最新版本

// ==UserScript==
// @name         "Not Yet Aired" Hider
// @namespace    https://gf.qytechs.cn/en/users/670188-hacker09?sort=daily_installs
// @version      0.2
// @description  Allows you to hide "Not Yet Aired" entries of your list.
// @author       hacker09
// @match        https://myanimelist.net/animelist/*
// @match        https://myanimelist.net/mangalist/*
// @icon         https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://myanimelist.net&size=64
// @grant        GM_registerMenuCommand
// @run-at       document-end
// ==/UserScript==

(function() {
  'use strict';
  GM_registerMenuCommand("Hide Not Yet Aired entries", function() { //Creates a new function
    document.querySelectorAll("span.content-status").forEach(function(el) { //ForEach entry
      if (el.innerText === 'Not Yet Aired') //If the entry has not yet aired
      { //Starts the if condition
        el.parentNode.parentNode.style.display = 'none'; //Hides the element
      } //Finishes the if condition
    }) //Finishes the ForEach loop

  }); //Adds an option to the menu and finishes the function

  GM_registerMenuCommand("Show Not Yet Aired entries", function() { //Creates a new function
    document.querySelectorAll("tr.list-table-data").forEach(a => a.style.display = ''); //Shows the element
  }); //Adds an option to the menu and finishes the function
})();

QingJ © 2025

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