Data pulled from my ranks API, see anons-s2-secret-nft.
- Install ViolentMonkey, Tampermonkey, Greasemonkey or any other userscript manager.
- Add userscript
- Go to https://stashh.io/collection/anon-army?sort=listing_date+desc
Data pulled from my ranks API, see anons-s2-secret-nft.
// ==UserScript== | |
// @name Show Anons S2 ranks | |
// @namespace Violentmonkey Scripts | |
// @version 0.1 | |
// @description Show Anons S2 ranks on Stashh | |
// @author rigwild | |
// @match https://stashh.io/* | |
// @icon https://www.google.com/s2/favicons?domain=stashh.io | |
// @grant none | |
// ==/UserScript== | |
(async function() { | |
'use strict'; | |
const myRarity = await fetch('https://anons-s2-ranks.rigwild.workers.dev/').then(res => res.json()).then(res => res._output_rarity.elements) | |
if (typeof window.ranksShown !== 'boolean') window.ranksShown = false | |
function showRanksVisibleMessage() { | |
if (!window.ranksShown) { | |
const showingRanks = document.createElement('div') | |
showingRanks.innerText = 'Showing ranks (Anons S2)' | |
showingRanks.style.color = 'red' | |
showingRanks.style.position = 'sticky' | |
showingRanks.style.fontWeight = 'bold' | |
showingRanks.style.fontSize = '20px' | |
showingRanks.style.textAlign = 'center' | |
showingRanks.style.top = '20px' | |
showingRanks.style.left = '-200px' | |
showingRanks.style.width = '100%' | |
showingRanks.style.zIndex = 9999 | |
document.body.prepend(showingRanks) | |
window.ranksShown = true | |
} | |
} | |
function showRanks() { | |
let visibleTitles = [...document.querySelectorAll('.css-1ogcd12'), ...document.querySelectorAll('.css-qj2xh2')] | |
visibleTitles.forEach(title => { | |
title.style.overflow = 'inherit' | |
const match = title.innerText.match(/^Anon Army #(\d+)$/) | |
if (match && match.length >= 2) { | |
const id = +match[1] | |
let change = myRarity[id].rank - myRarity[id].rankWithoutTraitsCount | |
change = change >= 0 ? `⬇️${change}` : `⬆️${Math.abs(change)}` | |
title.innerText = `${id} | 🏆 ${myRarity[id].rankWithoutTraitsCount} > ${myRarity[id].rank} (${change})` | |
showRanksVisibleMessage() | |
} | |
}) | |
} | |
setInterval(showRanks, 500) | |
})(); |