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 () {