您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Ignores Neofriend-only auctions by default
// ==UserScript== // @name Neopets: skip NF-only auctions // @author Tombaugh Regio // @version 1.2 // @description Ignores Neofriend-only auctions by default // @namespace https://greasyfork.org/users/780470 // @include *://www.neopets.com/auctions.phtml* // @include *://www.neopets.com/genie.phtml // @license MIT // @grant none // ==/UserScript== if (/genie/.test(window.location.href)) document.querySelector('input[name="exclude_nf_only"]').checked = true else { const NFonly = [...document.querySelectorAll('.content center tr > td:nth-of-type(4)')].slice(1).filter(a => /\[NF\]/.test(a.textContent)) const NFelement = document.querySelector('.content > center > p:first-of-type') const buttonParagraph = document.createElement('p') const button = document.createElement('button') NFonly.forEach(entry => entry.parentNode.style.display = 'none') button.textContent = 'Include [NF]-only auctions' button.onclick = (e) => { e.preventDefault() const isFiltered = /Include/.test(button.textContent) NFonly.forEach(entry => entry.parentNode.style.display = isFiltered ? 'table-row' : 'none') button.textContent = isFiltered ? 'Exclude [NF]-only auctions' : 'Include [NF]-only auctions' } buttonParagraph.appendChild(button) NFelement.replaceWith(buttonParagraph) }