Skip to content

Instantly share code, notes, and snippets.

@Inigovd
Created October 3, 2017 08:10
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/817b977c408791ff1647417593f7292e to your computer and use it in GitHub Desktop.
Save Inigovd/817b977c408791ff1647417593f7292e to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Dentacoin ICO $ calculator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Mattblack
// @match https://www.dentacoin.com/ico/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 2
});
$(document).ready(function(){
setTimeout(function(){
$.get('https://api.gdax.com/products/BTC-USD/ticker', function(response){
var sold_dcn = parseInt($('#dcndest').text());
var sold_usd = sold_dcn / 33000000 * response.price;
var elem = $('<div/>').addClass('h5').html(formatter.format(sold_usd));
$(elem).insertAfter($('#dcndest'));
}, 'json');
}, 2500);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment