mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Update queries.js
jpgpi250 <jpgpi250@gmail.com> accompanies FTL PR 1409
This commit is contained in:
@@ -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 = "<span class='text-red'>Blocked <br class='hidden-lg'>(regex blacklist)";
|
||||
blocked = true;
|
||||
if (data.length > 9 && data[9] > 0) {
|
||||
regexLink = true;
|
||||
}
|
||||
|
||||
buttontext =
|
||||
'<button type="button" class="btn btn-default btn-sm text-green"><i class="fas fa-check"></i> Whitelist</button>';
|
||||
break;
|
||||
@@ -183,10 +184,6 @@ $(function () {
|
||||
fieldtext =
|
||||
"<span class='text-red'>Blocked <br class='hidden-lg'>(regex blacklist, CNAME)</span>";
|
||||
blocked = true;
|
||||
if (data.length > 9 && data[9] > 0) {
|
||||
regexLink = true;
|
||||
}
|
||||
|
||||
buttontext =
|
||||
'<button type="button" class="btn btn-default btn-sm text-green"><i class="fas fa-check"></i> Whitelist</button>';
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user