Skip to content

Instantly share code, notes, and snippets.

@Inigovd
Created October 3, 2017 08:29
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 Inigovd/5b47e63e360e97d99e3f68c8fe1b2d58 to your computer and use it in GitHub Desktop.
Save Inigovd/5b47e63e360e97d99e3f68c8fe1b2d58 to your computer and use it in GitHub Desktop.
// ==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);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment