mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
fixed tables.js according to linter
This commit is contained in:
parent
38a257d6af
commit
f6354c9ef2
1 changed files with 15 additions and 14 deletions
|
@ -2,22 +2,23 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
var siteApi = window.globals.siteApi || '/api/v1';
|
var siteApi = window.globals.siteApi || '/api/v1',
|
||||||
var marketCapApi = 'https://www.coincap.io/front/';
|
marketCapApi = 'https://www.coincap.io/front/';
|
||||||
|
|
||||||
if ($('#marketcap_count').length) {
|
if ($('#marketcap_count').length) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: marketCapApi,
|
url: marketCapApi,
|
||||||
dataType: "jsonp",
|
dataType: 'jsonp'
|
||||||
}).done(function(json) {
|
}).done(function(json) {
|
||||||
var $dash="DASH",
|
var $dash = 'DASH',
|
||||||
result = json.filter(function(itm){
|
result = json.filter(function(itm) {
|
||||||
return $dash.indexOf(itm.short) > -1;
|
return $dash.indexOf(itm.short) > -1;
|
||||||
});
|
}),
|
||||||
var num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
|
num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
|
||||||
$('#marketcap_count').text(num);
|
|
||||||
});
|
$('#marketcap_count').text(num);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('#blocks').length) {
|
if ($('#blocks').length) {
|
||||||
|
@ -70,7 +71,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $('#masternodes_count').length && $('#masternodes_count').length ) {
|
if ($('#masternodes_count').length && $('#masternodes_count').length) {
|
||||||
|
|
||||||
// Get the current number of masternodes.
|
// Get the current number of masternodes.
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue