diff --git a/groups-domains.php b/groups-domains.php index fa18be5ffd..cad112549d 100644 --- a/groups-domains.php +++ b/groups-domains.php @@ -48,7 +48,8 @@
- + +
diff --git a/scripts/pi-hole/js/groups-domains.js b/scripts/pi-hole/js/groups-domains.js index a165300b16..b455dcff76 100644 --- a/scripts/pi-hole/js/groups-domains.js +++ b/scripts/pi-hole/js/groups-domains.js @@ -55,10 +55,60 @@ $(function () { $("#add2black, #add2white").on("click", addDomain); + var suggestTimeout; + $("#new_domain").on("input", function (e) { + hideSuggestDomains(); + clearTimeout(suggestTimeout); + suggestTimeout = setTimeout(showSuggestDomains, 1000, e.target.value); + }); + utils.setBsSelectDefaults(); getGroups(); }); +function showSuggestDomains(value) { + function createButton(hostname) { + // Purposefully omit 'btn' class to save space on padding + return $('