Quest Table - Kappa Mod

Adds a column to quest tables that show whether task is Kappa or not

目前为 2021-02-13 提交的版本。查看 最新版本

// ==UserScript==
// @name         Quest Table - Kappa Mod
// @namespace    quest-eft-gamepedia
// @version      0.1
// @description  Adds a column to quest tables that show whether task is Kappa or not
// @author       PlatinumLyfe
// @match        https://escapefromtarkov.gamepedia.com/Quests
// @grant        GM_addStyle
// @grant        GM_addElement
// @grant        GM_xmlhttpRequest
// @grant        none
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// ==/UserScript==

(function() {

    $('.mw-parser-output .wikitable').each(function(idx, itm) {
        $(itm).find('tr:nth-child(2) th:first-child').after('<th>Kappa</th>');
        $(itm).find('tr').each(function (idxi, tr) {
            $(tr).find('th').each(function(id, th) {
                var thx = $(th);
                if (!thx.attr('colspan')) {
                    thx.find('a').each(function(i, a) {
                        window.console.log('Retrieve: ', $(a).attr('href'));
                        window.jQuery.get($(a).attr('href')).then(function (data) {
                            thx.after($('<td>' + $(data).find('.mw-parser-output .va-infobox-group:nth-child(3) tr:last-child .va-infobox-content').html() + '</td>'));
                        });
                    });
                } else if (thx.attr('colspan') == 10) {
                    thx.attr('colspan', '11');
                }
            });
        });
    });
})();

QingJ © 2025

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