From 5c356ab1777a1465d3f3c2491d7428e5c157b73b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:44:28 +0200 Subject: [PATCH] Add confirmation to regex deletion --- public/scripts/extensions/regex/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/scripts/extensions/regex/index.js b/public/scripts/extensions/regex/index.js index 2a0789794..59fe2aa12 100644 --- a/public/scripts/extensions/regex/index.js +++ b/public/scripts/extensions/regex/index.js @@ -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") }); });