fixed network page and scripts

This commit is contained in:
Lee Wong 2017-03-29 23:06:31 +07:00 committed by tungfa
parent c3111a3ade
commit 9fb6c4e19d
2 changed files with 7 additions and 10 deletions

View file

@ -86,7 +86,7 @@ description: pages.currency.description
<a href="https://explorer.dashninja.pl/chain/Dash" target="_blank" class="btn-blue-solid">DashNinja</a>
<a href="https://bitinfocharts.com/darkcoin/explorer/" target="_blank" class="btn-blue-solid">BitInfoCharts</a>
</div>
<table id="blocks">
<table id="blocks" width="100%">
<thead>
<tr>
<th>Height</th>

View file

@ -3,23 +3,20 @@
$(document).ready(function () {
var siteApi = window.globals.siteApi || '/api/v1';
var marketCapApi = 'https://www.coincap.io/front/'
var marketCapApi = 'https://www.coincap.io/front/';
if ($('#marketcap_count').length) {
function results(json){
$.ajax({
url: marketCapApi,
dataType: "jsonp",
}).done(function(json) {
var $dash="DASH",
result = json.filter(function(itm){
return $dash.indexOf(itm.short) > -1;
});
var num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
$('#marketcap_count').text(num);
}
$.ajax({
url: marketCapApi,
dataType: "jsonp",
jsonpCallback: "results"
});
}
@ -73,7 +70,7 @@
});
}
if ($('#masternodes_count').length) {
if ( $('#masternodes_count').length && $('#masternodes_count').length ) {
// Get the current number of masternodes.
$.ajax({