Add confirmation to regex deletion

This commit is contained in:
Cohee 2023-11-05 23:44:28 +02:00
parent c520ad212a
commit 5c356ab177
1 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,12 @@ async function loadRegexScripts() {
await onRegexEditorOpenClick(scriptHtml.attr("id"));
});
scriptHtml.find('.delete_regex').on('click', async function () {
const confirm = await callPopup("Are you sure you want to delete this regex script?", "confirm");
if (!confirm) {
return;
}
await deleteRegexScript({ existingId: scriptHtml.attr("id") });
});