您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Anime Cards
// ==UserScript== // @name Dueling Nexus Anime Cards // @namespace https://duelingnexus.com/ // @description Anime Cards // @version 0.3 // @match https://duelingnexus.com/game/* // @match https://duelingnexus.com/editor/* // @grant none // ==/UserScript== (function() { window.usingAnimeCards = true; const getAsset = (a) => "assets/" + a; const imageVersion = "1937fe2"; const IMAGE_SOURCES = { anime: "https://raw.githubusercontent.com/yasuotornado/Anime-Cards/master/images/", github: "https://raw.githubusercontent.com/DuelingNexus/images/" + imageVersion + "/", cdn: "https://cdn.jsdelivr.net/gh/DuelingNexus/images@" + imageVersion + "/" } const loadCardImage = function (id, useAnime) { if(id === 0) { return getAsset("images/cover.png"); } else if(id === -1) { return getAsset("images/unknown.png"); } else { let image = id + ".jpg"; let source; if(useAnime) { source = IMAGE_SOURCES.anime; } else if(da) { source = IMAGE_SOURCES.github; } else { source = IMAGE_SOURCES.cdn; } return source + image; } } // update window.ra = loadCardImage; window.l = function l(img, id, useAnime = usingAnimeCards) { img.off("error"); img.attr("src", ra(id, useAnime)); if (0 < id) img.one("error", function() { if(useAnime) { // try without l(img, id, false); } else { $(this).attr("src", ra(-1)); } }) } })();