mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add confirmation to regex deletion
This commit is contained in:
@ -91,6 +91,12 @@ async function loadRegexScripts() {
|
|||||||
await onRegexEditorOpenClick(scriptHtml.attr("id"));
|
await onRegexEditorOpenClick(scriptHtml.attr("id"));
|
||||||
});
|
});
|
||||||
scriptHtml.find('.delete_regex').on('click', async function () {
|
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") });
|
await deleteRegexScript({ existingId: scriptHtml.attr("id") });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user