Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Vircurex total balance script
- By Jakub Krol (c) 2014
- Run it for example in Firebug on main page of Vicurex to get all amounts recounted into BTC and USD.
- **/
- var $btc_total=0.0;
- console.log('----YOUR BALANCE---');
- function parseAmount($str){
- return parseFloat($str.replace(',',''));
- }
- $('td[id^=COIN_]').each(function(){
- var $am = parseAmount($(this).text());
- var $coins = $(this).attr('id').substr(5);
- var $inBTC = $coins=='BTC'?$am:($am*parseAmount($('#'+$coins+'_BTC_bid').text()));
- $btc_total+=$inBTC;
- console.log($coins+' '+$am+' ~= BTC '+$inBTC);
- });
- console.log('-------TOTAL-------');
- console.log('BTC '+$btc_total);
- console.log('USD '+($btc_total*parseAmount($('#BTC_USD_bid').text())));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement