Created
October 3, 2017 08:29
-
-
Save Inigovd/5b47e63e360e97d99e3f68c8fe1b2d58 to your computer and use it in GitHub Desktop.
Revisions
-
Inigovd created this gist
Oct 3, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ // ==UserScript== // @name Etherparty ICO $ calculator // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author Mattblack // @match https://etherparty.io/ico/ // @grant none // ==/UserScript== (function() { 'use strict'; var formatter = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 2 }); jQuery(document).ready(function(){ setTimeout(function(){ jQuery.get('https://api.gdax.com/products/ETH-USD/ticker', function(response){ var sold_eth = parseInt(jQuery('#jsEthRaised').text().replace(',', '')); var sold_usd = sold_eth * response.price; var elem = jQuery('<div/>').addClass('h5').html(formatter.format(sold_usd)); jQuery(elem).insertAfter(jQuery('.hero-content a')); }, 'json'); }, 2500); }); })();