Created
October 3, 2017 08:10
-
-
Save Inigovd/817b977c408791ff1647417593f7292e to your computer and use it in GitHub Desktop.
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 characters
// ==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