From c62daea621eb9b7dd174f671ce951316736d53bb Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 10 Feb 2018 16:32:29 +0100 Subject: [PATCH] Remove unnecessary options variable Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 623ce881..58ec73b9 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -82,7 +82,7 @@ function add(domain,list) { } }); }); - + // Reset Modal after it has faded out alertModal.one("hidden.bs.modal", function() { alProcessing.show(); @@ -122,27 +122,25 @@ $(document).ready(function() { location.search.substr(1).split("&").forEach(function(item) {GETDict[item.split("=")[0]] = item.split("=")[1];}); var APIstring = "api.php?getAllQueries"; - var options = ""; if("from" in GETDict && "until" in GETDict) { - options += "&from="+GETDict["from"]; + APIstring += "&from="+GETDict["from"]; APIstring += "&until="+GETDict["until"]; } else if("client" in GETDict) { - options += "&client="+GETDict["client"]; + APIstring += "&client="+GETDict["client"]; } else if("domain" in GETDict) { - options += "&domain="+GETDict["domain"]; + APIstring += "&domain="+GETDict["domain"]; } // If we don't ask filtering and also not for all queries, just request the most recent 100 queries else if(!("all" in GETDict)) { APIstring += "=100"; } - APIstring += options; tableApi = $("#all-queries").DataTable( { "rowCallback": function( row, data, index ){