Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add alternating background color for grouping erc20 transfers per tx #22

Open
Philx0 opened this issue Mar 16, 2024 · 0 comments

Comments

@Philx0
Copy link

Philx0 commented Mar 16, 2024

Navigating erc-20 transfers can be quite tedious, I would propose adding background colors to group erc-20 transfers accord to tx hash.

chrome_21h15_16-03-24-(151)

The paths that can benefit from this:

https://etherscan.io/tokentxns?a=*
https://etherscan.io/token/*
https://etherscan.io/address/*

I've made userscripts for it some years ago for use with eg tampermonkey, so don't judge the quality please 😄
For instance, for the https://etherscan.io/address/* path:

// ==UserScript==
// @name         color txs /adress/
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  color txs /adress/
// @author       Philx0
// @match        https://etherscan.io/address/*
// @match        https://bscscan.com/address/*
// @match        https://ftmscan.com/address/*
// @match        https://arbiscan.io/address/*
// @match        https://snowtrace.io/address/*

// @grant        none
// ==/UserScript==

(function() {
    'use strict';

function color(){
    try{
        let lastTx = "" ;
        var iframe = document.getElementById("tokenpageiframe");
        let rows= iframe.contentWindow.document.getElementsByClassName("table table-hover")[0].children[1].children
        let lastColor = false

        for(var i = 0; i<rows.length;i++){
            let tx=rows[i].children[1].innerText
            if(lastTx != tx){
                lastColor = !lastColor
            }
            rows[i].style.backgroundColor = lastColor ? "#e0e0d1" : "white"
            lastTx=tx
        }
    }catch(Exception){
        console.log("trying color again")
        setTimeout(color, 1500)
    }
}
color()
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant