MyAnimeList(MAL) - Popup for "Edit Details"

This script will show a popup when you click "Edit details" on any anime/manga page.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         MyAnimeList(MAL) - Popup for "Edit Details"
// @version      1.1.2
// @description  This script will show a popup when you click "Edit details" on any anime/manga page.
// @author       Cpt_mathix
// @match        https://myanimelist.net/anime/*
// @match        https://myanimelist.net/manga/*
// @match        https://myanimelist.net/anime.php*
// @match        https://myanimelist.net/manga.php*
// @exclude      /^https?:\/\/myanimelist\.net\/(anime|manga)\/[^0-9]+/
// @license      GPL-2.0-or-later
// @grant        none
// @namespace https://greasyfork.org/users/16080
// ==/UserScript==

(function() {
    'use strict';

    function popupForEditDetails() {
        var pageEdit = document.querySelector('#addtolist > table > tbody > tr > td:nth-child(2) > small > a');
        if (pageEdit) {
            pageEdit.className = "Lightbox_Script button_add";
            pageEdit.href += "?hideLayout=1";
        }

        var pageAddDetails = document.querySelector('#addtolistresult > a');
        if (pageAddDetails) {
            pageAddDetails.className = "Lightbox_Script button_add";
            pageAddDetails.href += "&hideLayout=1";
        }

        $('.Lightbox_Script').fancybox({
            'width'			: 700,
            'height'		: '85%',
            'overlayShow'	: false,
            'titleShow'     : false,
            'type'          : 'iframe'
        });
    }

    var script = document.createElement('script');
    script.appendChild(document.createTextNode('('+ popupForEditDetails +')();'));
    (document.body || document.head || document.documentElement).appendChild(script);
})();