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,20 +2,21 @@
'use strict';
$(document).ready(function () {
var siteApi = window.globals.siteApi || '/api/v1';
var marketCapApi = 'https://www.coincap.io/front/';
var siteApi = window.globals.siteApi || '/api/v1',
marketCapApi = 'https://www.coincap.io/front/';
if ($('#marketcap_count').length) {
$.ajax({
url: marketCapApi,
dataType: "jsonp",
dataType: 'jsonp'
}).done(function(json) {
var $dash="DASH",
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,");
}),
num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
$('#marketcap_count').text(num);
});
}