From 43056fdcaf08c3ff60b40d28c3f8bc7ac753d9fd Mon Sep 17 00:00:00 2001 From: jpgpi250 Date: Mon, 12 Sep 2022 12:57:18 +0200 Subject: [PATCH] Update queries.js jpgpi250 accompanies FTL PR 1409 --- scripts/pi-hole/js/queries.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 19d88326..d96ac77e 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -113,7 +113,12 @@ $(function () { buttontext = "", blocked = false, isCNAME = false, - regexLink = false; + DomainlistLink = false; + + // accompanies Store domainlist IDs for blocked/permitted queries FTL PR 1409 + if (data.length > 9 && Number.isInteger(parseInt(data[9], 10)) && data[9] > 0) { + DomainlistLink = true; + } switch (data[4]) { case "1": @@ -141,10 +146,6 @@ $(function () { case "4": fieldtext = "Blocked (regex blacklist)"; blocked = true; - if (data.length > 9 && data[9] > 0) { - regexLink = true; - } - buttontext = ''; break; @@ -183,10 +184,6 @@ $(function () { fieldtext = "Blocked (regex blacklist, CNAME)"; blocked = true; - if (data.length > 9 && data[9] > 0) { - regexLink = true; - } - buttontext = ''; isCNAME = true; @@ -242,10 +239,10 @@ $(function () { $("td:eq(4)", row).html(fieldtext); $("td:eq(6)", row).html(buttontext); - if (regexLink) { + if (DomainlistLink) { $("td:eq(4)", row).hover( function () { - this.title = "Click to show matching regex filter"; + this.title = "Click to show matching blacklist/whitelist domain"; this.style.color = "#72afd2"; }, function () {