mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 04:38:28 +00:00
Merge pull request #2026 from chrismiceli/issue/1119
1119 Privacy - Query Page and Dom.storage
This commit is contained in:
@@ -358,7 +358,7 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) {
|
||||
// Bar/Smooth chart toggle
|
||||
$(function () {
|
||||
var bargraphs = $("#bargraphs");
|
||||
var chkboxData = localStorage.getItem("barchart_chkbox");
|
||||
var chkboxData = localStorage ? localStorage.getItem("barchart_chkbox") : null;
|
||||
|
||||
if (chkboxData !== null) {
|
||||
// Restore checkbox state
|
||||
@@ -366,7 +366,9 @@ $(function () {
|
||||
} else {
|
||||
// Initialize checkbox
|
||||
bargraphs.prop("checked", true);
|
||||
localStorage.setItem("barchart_chkbox", true);
|
||||
if (localStorage) {
|
||||
localStorage.setItem("barchart_chkbox", true);
|
||||
}
|
||||
}
|
||||
|
||||
bargraphs.click(function () {
|
||||
@@ -376,7 +378,7 @@ $(function () {
|
||||
|
||||
$(function () {
|
||||
var colorfulQueryLog = $("#colorfulQueryLog");
|
||||
var chkboxData = localStorage.getItem("colorfulQueryLog_chkbox");
|
||||
var chkboxData = localStorage ? localStorage.getItem("colorfulQueryLog_chkbox") : null;
|
||||
|
||||
if (chkboxData !== null) {
|
||||
// Restore checkbox state
|
||||
@@ -384,7 +386,9 @@ $(function () {
|
||||
} else {
|
||||
// Initialize checkbox
|
||||
colorfulQueryLog.prop("checked", false);
|
||||
localStorage.setItem("colorfulQueryLog_chkbox", false);
|
||||
if (localStorage) {
|
||||
localStorage.setItem("colorfulQueryLog_chkbox", false);
|
||||
}
|
||||
}
|
||||
|
||||
colorfulQueryLog.click(function () {
|
||||
|
||||
Reference in New Issue
Block a user