Adds links to the static lot numbers and show how many active lots you currently have
当前为
// ==UserScript==
// @name [GC] Trading Post QoL
// @namespace Masterofdarkness and hanso
// @match https://www.grundos.cafe/island/tradingpost/*
// @match https://grundos.cafe/island/tradingpost/*
// @grant GM_setValue
// @license MIT
// @version 1
// @author Masterofdarkness and hanso
// @description Adds links to the static lot numbers and show how many active lots you currently have
// @downloadURL
// @updateURL
// ==/UserScript==
//Regular TP Lots
document.querySelectorAll('div.flex-column.small-gap span > strong').forEach(strong => {const m = strong.innerHTML.match(/Lot #(\d+)/);if(m)strong.innerHTML = `<a href="https://www.grundos.cafe/island/tradingpost/lot/${m[1]}">Lot #${m[1]}</a>`});
//Your TP Lots
document.querySelectorAll('div.flex.space-between > strong').forEach(strong => {const m = strong.innerHTML.match(/Lot #(\d+)/);if(m)strong.innerHTML = `<a href="https://www.grundos.cafe/island/tradingpost/lot/${m[1]}">Lot #${m[1]}</a>`});
//Get Number of active lots
let i = 0;
document.querySelectorAll('div.trade-lot.flex-column.big-gap').forEach(trade => {i++});
//Print value of active lots out of 20
let elements = document.querySelector('strong.center.bigfont')
elements.textContent += ` (${i}/20)`;