Skip to content

Commit

Permalink
Merge pull request #1088 from pi-hole/location
Browse files Browse the repository at this point in the history
Be explicit about `window.location`
  • Loading branch information
DL6ER authored Dec 28, 2019
2 parents 132c69b + 2ba18a1 commit 03b3a1d
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 03b3a1d

Please sign in to comment.