Cpt_mathix / MyAnimeList(MAL) - Popup for "Edit Details"

// ==UserScript==
// @name         MyAnimeList(MAL) - Popup for "Edit Details"
// @version      1.0.7
// @description  This script will show a popup when you click "Edit details" on any anime/manga page.
// @author       Cpt_mathix
// @include      /^https?:\/\/myanimelist\.net\/(anime|manga)\/\d+/
// @include      /^https?:\/\/myanimelist\.net\/(anime|manga)\/\d+\/.*/
// @include      *://myanimelist.net/(anime|manga).php?id=*
// @licence      GPL-2.0+; http://www.gnu.org/licenses/gpl-2.0.txt
// @grant        none
// @namespace https://greasyfork.org/users/16080
// ==/UserScript==

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

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

if (typeof jQuery == 'undefined') $ = unsafeWindow.$;

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