mirror of
https://github.com/pi-hole/web.git
synced 2025-12-19 18:28:24 +00:00
settings-dns-records: merge DOMContentLoaded listeners (#3538)
This commit is contained in:
@@ -145,11 +145,6 @@ function populateDataTable(endpoint) {
|
||||
});
|
||||
}
|
||||
|
||||
$(() => {
|
||||
populateDataTable("hosts");
|
||||
populateDataTable("cnameRecords");
|
||||
});
|
||||
|
||||
function deleteRecord() {
|
||||
if ($(this).attr("data-type") === "hosts") delHosts($(this).attr("data-tag"));
|
||||
else delCNAME($(this).attr("data-tag"));
|
||||
@@ -215,6 +210,9 @@ function delCNAME(elem) {
|
||||
}
|
||||
|
||||
$(() => {
|
||||
populateDataTable("hosts");
|
||||
populateDataTable("cnameRecords");
|
||||
|
||||
$("#btnAdd-host").on("click", () => {
|
||||
utils.disableAll();
|
||||
const elem = $("#Hip").val() + " " + $("#Hdomain").val();
|
||||
|
||||
Reference in New Issue
Block a user