mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +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() {
|
function deleteRecord() {
|
||||||
if ($(this).attr("data-type") === "hosts") delHosts($(this).attr("data-tag"));
|
if ($(this).attr("data-type") === "hosts") delHosts($(this).attr("data-tag"));
|
||||||
else delCNAME($(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", () => {
|
$("#btnAdd-host").on("click", () => {
|
||||||
utils.disableAll();
|
utils.disableAll();
|
||||||
const elem = $("#Hip").val() + " " + $("#Hdomain").val();
|
const elem = $("#Hip").val() + " " + $("#Hdomain").val();
|
||||||
|
|||||||
Reference in New Issue
Block a user