Neopets Auction House - Comma-Formatted Numbers

Updates the Neopets auction pages to format the bid and asking numbers with commas

// ==UserScript==
// @name         Neopets Auction House - Comma-Formatted Numbers
// @namespace    http://tampermonkey.net/
// @version      0.4
// @license      MIT
// @description  Updates the Neopets auction pages to format the bid and asking numbers with commas
// @author       Morde
// @match        https://www.neopets.com/auctions.phtml*
// @match        https://www.neopets.com/genie.phtml*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=neopets.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const rows = $('table:has(> tbody > tr > td[bgcolor="#dddd77"]) tr')

    $(rows).find('td b').each((i, ele) => {
        ele.innerText = ele.innerText.split(' ').map(x => {
            const num = Number(x);
            return Number.isFinite(num) ? num.toLocaleString() : x;
        }).join(' ');
    });
})();