您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a search bar to filter hoard items in the Flight Rising Auction House's Sell page.
// ==UserScript== // @name Flight Rising - Auction House Hoard Item Search // @namespace https://greasyfork.org/en/users/322117 // @version 0.2 // @description Adds a search bar to filter hoard items in the Flight Rising Auction House's Sell page. // @author mechagotch // @match https://www1.flightrising.com/auction-house/sell/realm/* // @icon https://www.google.com/s2/favicons?sz=64&domain=flightrising.com // @grant none // ==/UserScript== (function() { 'use strict'; const checkInterval = setInterval(() => { const container = document.querySelector('.ah-sell-item-list'); if (container) { clearInterval(checkInterval); const searchInput = document.createElement('input'); searchInput.type = 'text'; searchInput.id = 'fr-ah-search'; searchInput.placeholder = 'Search hoard'; searchInput.style = `margin-bottom:10px; padding:5px; width: 100%; display:block;` container.parentNode.insertBefore(searchInput, container); const items = container.querySelectorAll('.ah-sell-item'); function filterItems() { const searchTerm = searchInput.value.toLowerCase().trim(); items.forEach(item => { const itemName = item.getAttribute('data-name')?.toLowerCase() || ''; if (searchTerm === '' || itemName.includes(searchTerm)) { item.style.display = '' const padContainer = item.closest('.ah-sell-item-padcontainer'); if (padContainer) { padContainer.style.display = '' } } else { item.style.display = 'none'; // Hide item } }); const padContainers = container.querySelectorAll('.ah-sell-item-padcontainer'); padContainers.forEach(padContainer => { const visibleItems = padContainer.querySelectorAll('.ah-sell-item:not([style*="display: none"])'); if (visibleItems.length === 0) { padContainer.style.display = 'none'; } else { padContainer.style.display = '' } }); } searchInput.addEventListener('input', filterItems); } }, 500); // The site lags, give it 500ms })();