Etherscan Absolute Times

Show absolute instead of relative times on Etherscan

As of 2018-09-04. See the latest version.

  1. // ==UserScript==
  2. // @name Etherscan Absolute Times
  3. // @description Show absolute instead of relative times on Etherscan
  4. // @author TheRealHawk
  5. // @namespace https://etherscan.io
  6. // @match https://etherscan.io/address*
  7. // @match https://etherscan.io/txs*
  8. // @match https://etherscan.io/tokentxns*
  9. // @version 1.1
  10. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  11. // @require https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js
  12. // ==/UserScript==
  13.  
  14. // Workaround to get rid of "'$' is not defined" warnings
  15. var $ = window.jQuery;
  16.  
  17. $('.table span:contains(" ago")').each(function() {
  18. var relTime = $(this).text();
  19. var absTime = $(this).attr('data-original-title');
  20. absTime = moment(absTime, "MMM-DD-YYYY hh:mm:ss A", "en").format("YYYY-MM-DD HH:mm:ss");
  21. $(this).attr('data-original-title', relTime);
  22. $(this).text(absTime);
  23. });