Skip to content

Instantly share code, notes, and snippets.

@H-Gomez
Last active February 23, 2023 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save H-Gomez/178e2c476b61febf10ef75ed866b39b8 to your computer and use it in GitHub Desktop.
Save H-Gomez/178e2c476b61febf10ef75ed866b39b8 to your computer and use it in GitHub Desktop.
Koinly Solana Browser
// select all list items
const explorerUrl = 'https://solscan.io/tx/';
const nodes = document.querySelectorAll('.well')
// open all dropdowns for transactions.
nodes.forEach(node => {
node.click()
})
// get all txhashs from the dropdowns
const txHashes = document.querySelectorAll('.react-slidedown > .txn-slidedown-inner > .px-2 > .row > div:nth-child(1) > .mt-2 > .pt-1')
// loop over hashes and remove the front text
txHashes.forEach(hash => {
const cleanedHash = hash.textContent.split(" ")[1]
const link = document.createElement('a');
link.href = explorerUrl + cleanedHash;
link.target = '_blank';
const span = document.createElement('span')
span.textContent = cleanedHash
link.appendChild(span)
hash.appendChild(link);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment