Enhance Incubator Plus 2.0

Enhances Incubator Plus 2.0.

// ==UserScript==
// @name         Enhance Incubator Plus 2.0
// @namespace    https://lit.link/toracatman
// @version      2025-06-30
// @description  Enhances Incubator Plus 2.0.
// @author       You
// @match        https://incubator.miraheze.org/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==

let css = `.allpagesredirect a {
    color: green;
}

.delete {
    color: red !important;
}`;

(() => {
    let style = document.createElement("style");
    style.textContent = css;
    document.head.appendChild(style);

    let member = {};
    let dct = "Category:Maintenance:Delete";
    fetch(`${location.origin}/w/api.php?action=query&list=categorymembers&cmtitle=${dct}&cmprop=title&cmlimit=500&format=json`)
        .then((response) => response.json())
        .then((data) => {
        let m = data.query.categorymembers;
        for (let i = 0; i < m.length; i++) {
            member[m[i].title] = "";
        }
        let a = document.querySelectorAll("#bodyContent a");
        for (let i = 0; i < a.length; i++) {
            if (a[i].title in member) {
                a[i].classList.add("delete");
            }
        }
    });
})();

QingJ © 2025

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