diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js index a887c0eee..7e0349a1b 100644 --- a/scripts/pi-hole/js/db_queries.js +++ b/scripts/pi-hole/js/db_queries.js @@ -20,7 +20,7 @@ var dateformat = "MMMM Do YYYY, HH:mm"; // Do we want to filter queries? var GETDict = {}; -location.search.substr(1).split("&").forEach(function(item) {GETDict[item.split("=")[0]] = item.split("=")[1];}); +window.location.search.substr(1).split("&").forEach(function(item) {GETDict[item.split("=")[0]] = item.split("=")[1];}); if("from" in GETDict && "until" in GETDict) { diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index a877dc7d5..4ed42887d 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -106,7 +106,7 @@ function autofilter(){ $(document).ready(function() { // Do we want to filter queries? var GETDict = {}; - location.search.substr(1).split("&").forEach(function(item) {GETDict[item.split("=")[0]] = item.split("=")[1];}); + window.location.search.substr(1).split("&").forEach(function(item) {GETDict[item.split("=")[0]] = item.split("=")[1];}); var APIstring = "api.php?getAllQueries"; diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 364184e97..670b3ff01 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -239,7 +239,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) { window.history.pushState("", "", "?tab=" + tab); if(tab === "piholedhcp") { - location.reload(); + window.location.reload(); } window.scrollTo(0, 0); });