fixed tables.js according to linter

This commit is contained in:
Lee Wong 2017-04-22 16:28:06 +07:00
parent 38a257d6af
commit f6354c9ef2

View file

@ -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({