您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add icons beside the monsters in Stages in the Game Database if the user owns them.
// ==UserScript== // @name Coliseum Familiar Collection Tracker // @namespace http://tampermonkey.net/ // @version 1.0 // @description Add icons beside the monsters in Stages in the Game Database if the user owns them. // @author floppa2k2 // @match https://www1.flightrising.com/game-database/stage/* // @icon https://www.google.com/s2/favicons?sz=64&domain=flightrising.com // @grant none // @license MIT // ==/UserScript== // Your player ID here (in your clan profile URL). const PLAYER_ID = 000000; // Check your Bestiary for your ownership status of each monster's corresponding familiar. async function checkIfFamiliarOwned(monsterName) { const BESTIARY_URL = encodeURI('https://www1.flightrising.com/bestiary/'+PLAYER_ID+'?view=all&name='+monsterName); const data = await $.get(BESTIARY_URL); const familiars = $(data).find('.bestiary-familiar'); for (var familiar of familiars) { const familiarName = $(familiar).find('.bestiary-familiar-name').text().trim(); const familiarIcons = $(familiar).find('.bestiary-icons').html(); if (familiarName === monsterName) { return familiarIcons; } } return null; } // Insert the hoard/lair collection icons from the Bestiary into the database page. async function labelFamiliars() { const MONSTER_LINKS = $('.common-plain-table > tbody > tr > td > a'); var iconPromises = []; for (var monsterLink of MONSTER_LINKS) { const monsterName = monsterLink.text.trim(); iconPromises.push(checkIfFamiliarOwned(monsterName)); } Promise.all(iconPromises).then((familiarIcons) => { Object.values(MONSTER_LINKS).forEach((link, index) => { $(link).append(familiarIcons[index]); }); }); } $(document).ready(function() { labelFamiliars(); });