Skip to content

Commit

Permalink
Be explicit about window.location
Browse files Browse the repository at this point in the history
Signed-off-by: XhmikosR <[email protected]>
  • Loading branch information
XhmikosR committed Dec 17, 2019
1 parent d966c7f commit 2ba18a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/db_queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 2ba18a1

Please sign in to comment.