From be4153b111dc399402a01b34ea0449b03fee1a30 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 18 Nov 2016 12:32:55 +0100 Subject: [PATCH] Addressed some more of codacy's "issues" --- js/pihole/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/pihole/index.js b/js/pihole/index.js index 05bd2dd7..24feb44f 100644 --- a/js/pihole/index.js +++ b/js/pihole/index.js @@ -1,3 +1,6 @@ +// Define global variables +var timeLineChart, queryTypeChart, forwardDestinationChart, forwardDestinationChart; + $(document).ready(function() { var isMobile = { @@ -165,7 +168,7 @@ function updateSummaryData(runOnce) { function updateQueriesOverTime() { $.getJSON("api.php?overTimeData10mins", function(data) { // Add data for each hour that is available - for (hour in data.ads_over_time) { + for (var hour in data.ads_over_time) { var d = new Date(); d.setHours(Math.floor(hour/6),10*(hour%6),0,0); timeLineChart.data.labels.push(d);