您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Comma seperates numbers in the auctions in a readable format
// ==UserScript== // @name Neopets Auctions - Comma Seperate // @namespace neopets // @version 2023.19.13 // @description Comma seperates numbers in the auctions in a readable format // @match *://*.neopets.com/genie.phtml* // @match *://*.neopets.com/auctions.phtml // @match *://*.neopets.com/auctions.phtml?auction_counter=* // @author blast me snowdaddy // ==/UserScript== (function() { 'use strict'; // Function to add commas to a number function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } // Select all <b> elements within <td> tags that are directly followed by " NP" let bElements = document.querySelectorAll('td b:not(:has(font))'); // Loop through all the selected elements for (let elem of bElements) { // Check if the content directly after the <b> tag is " NP" if (elem.nextSibling && elem.nextSibling.nodeValue && elem.nextSibling.nodeValue.trim() === "NP") { let number = parseInt(elem.textContent, 10); // Check if it's a valid number if (!isNaN(number)) { elem.textContent = numberWithCommas(number); // Setting formatted number } } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址