From f6354c9ef2192b9ee45a9f21b897934f979ad92c Mon Sep 17 00:00:00 2001 From: Lee Wong Date: Sat, 22 Apr 2017 16:28:06 +0700 Subject: [PATCH] fixed tables.js according to linter --- src/js/tables.js | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/js/tables.js b/src/js/tables.js index eeff399..87e90aa 100644 --- a/src/js/tables.js +++ b/src/js/tables.js @@ -2,22 +2,23 @@ '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", - }).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' + }).done(function(json) { + var $dash = 'DASH', + result = json.filter(function(itm) { + return $dash.indexOf(itm.short) > -1; + }), + num = result[0].mktcap.toFixed(0).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,'); + + $('#marketcap_count').text(num); + }); } 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. $.ajax({