File tree Expand file tree Collapse file tree
modules/servers/openproviderpremiumdns Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282 <script>
8383 document.addEventListener("DOMContentLoaded", function () {
8484 // ===== confirm before deleting a PDNS zone =====
85- document.addEventListener("click", function (e) {
85+ document.addEventListener("click", function (e) {
86+ if (!e.target || typeof e.target.closest !== "function") {
87+ return;
88+ }
8689 const deleteBtn = e.target.closest("a[menuitemname='Custom Module Button Delete PDNS Zone'], a[href*='a=TerminateAccount']");
8790 if (deleteBtn) {
8891 const confirmed = confirm("⚠️ Are you sure you want to delete this PDNS zone? This action cannot be undone.");
8992 if (!confirmed) {
9093 e.preventDefault();
9194 e.stopPropagation();
9295 e.stopImmediatePropagation();
93- return false ;
96+ return;
9497 }
9598 }
9699 }, true);
You can’t perform that action at this time.
0 commit comments