[GC] Trading Post QoL

Adds links to the static lot numbers and show how many active lots you currently have

当前为 2024-09-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name [GC] Trading Post QoL
  3. // @namespace Masterofdarkness and hanso
  4. // @match https://www.grundos.cafe/island/tradingpost/*
  5. // @match https://grundos.cafe/island/tradingpost/*
  6. // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
  7. // @grant GM_setValue
  8. // @license MIT
  9. // @version 1.1
  10. // @author Masterofdarkness and hanso
  11. // @description Adds links to the static lot numbers and show how many active lots you currently have
  12. // @downloadURL
  13. // @updateURL
  14. // ==/UserScript==
  15.  
  16. //Make static Lot#s clickable links
  17. document.querySelectorAll('div.flex-column.small-gap span > strong, 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>`});
  18.  
  19. //Get Number of active lots
  20. let i = 0;
  21. document.querySelectorAll('div.trade-lot.flex-column.big-gap').forEach(trade => {i++});
  22.  
  23. //Print value of active lots out of 20
  24. let elements = document.querySelector('strong.center.bigfont')
  25. elements.textContent += ` (${i}/20)`;
  26.  
  27.  
  28.