Fix warnings

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König
2023-04-08 21:16:06 +02:00
parent 8a4436a048
commit 34e45edbda
9 changed files with 49 additions and 49 deletions

View File

@@ -243,7 +243,7 @@ function stateLoadCallback(itemName) {
// Receive previous state from client's local storage area
if (localStorage === null) {
var item = backupStorage[itemName];
data = typeof item === "undefined" ? null : item;
data = item === "undefined" ? null : item;
} else {
data = localStorage.getItem(itemName);
}
@@ -310,15 +310,7 @@ function addFromQueryLog(domain, list) {
},
success: function (response) {
alProcessing.hide();
if (!response.success) {
// Failure
alNetworkErr.hide();
alCustomErr.html(response.message);
alFailure.fadeIn(1000);
setTimeout(function () {
alertModal.modal("hide");
}, 10000);
} else {
if (response.success) {
// Success
alSuccess.children(alDomain).text(domain);
alSuccess.children(alList).text(listtype);
@@ -326,6 +318,14 @@ function addFromQueryLog(domain, list) {
setTimeout(function () {
alertModal.modal("hide");
}, 2000);
} else {
// Failure
alNetworkErr.hide();
alCustomErr.html(response.message);
alFailure.fadeIn(1000);
setTimeout(function () {
alertModal.modal("hide");
}, 10000);
}
},
error: function () {