diff --git a/scripts/pi-hole/js/list.js b/scripts/pi-hole/js/list.js index 99e7be05..1ac0e294 100644 --- a/scripts/pi-hole/js/list.js +++ b/scripts/pi-hole/js/list.js @@ -13,13 +13,14 @@ var listType = $("#list-type").html(); var fullName = listType === "white" ? "Whitelist" : "Blacklist"; function sub(index, entry, arg) { - var domain = $("#"+index); + var domain = $("#list #"+index); var locallistType = listType; - domain.hide("highlight"); - if(arg === "wild") + if(arg === "regex") { - locallistType = "wild"; + locallistType = "regex"; + domain = $("#list-regex #"+index); } + domain.hide("highlight"); $.ajax({ url: "scripts/pi-hole/php/sub.php", method: "post", @@ -104,7 +105,7 @@ function refresh(fade) { ""); // Handle button $("#list-regex #"+index+"").on("click", "button", function() { - sub(index, entry, "wild"); + sub(index, entry, "regex"); }); }); } diff --git a/scripts/pi-hole/php/sub.php b/scripts/pi-hole/php/sub.php index ef2bb60d..d06d6537 100644 --- a/scripts/pi-hole/php/sub.php +++ b/scripts/pi-hole/php/sub.php @@ -21,7 +21,7 @@ switch($type) { case "black": exec("sudo pihole -b -q -d ${_POST['domain']}"); break; - case "wild": + case "regex": if(($list = file_get_contents($regexfile)) === FALSE) { $err = error_get_last()["message"];