diff --git a/public/index.html b/public/index.html index 06878afbd..51601ad5c 100644 --- a/public/index.html +++ b/public/index.html @@ -2344,6 +2344,9 @@ +
@@ -3561,4 +3564,4 @@ - \ No newline at end of file + diff --git a/public/script.js b/public/script.js index f22757020..b30c2c997 100644 --- a/public/script.js +++ b/public/script.js @@ -7672,9 +7672,11 @@ $(document).ready(function () { $(document).on("click", ".mes_edit_delete", async function () { - const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm'); - if (!confirmation) { - return; + if (power_user.confirm_message_delete) { + const confirmation = await callPopup("Are you sure you want to delete this message?", 'confirm'); + if (!confirmation) { + return; + } } const mes = $(this).closest(".mes"); diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index c1a548a22..4700a4817 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -632,6 +632,7 @@ function loadPowerUserSettings(settings, data) { $(`#pygmalion_formatting option[value=${power_user.pygmalion_formatting}]`).attr("selected", true); $(`#send_on_enter option[value=${power_user.send_on_enter}]`).attr("selected", true); $("#import_card_tags").prop("checked", power_user.import_card_tags); + $("#confirm_message_delete").prop("checked", power_user.confirm_message_delete !== undefined ? !!power_user.confirm_message_delete : true); $("#collapse-newlines-checkbox").prop("checked", power_user.collapse_newlines); $("#pin-examples-checkbox").prop("checked", power_user.pin_examples); $("#disable-description-formatting-checkbox").prop("checked", power_user.disable_description_formatting); @@ -1697,6 +1698,11 @@ $(document).ready(() => { saveSettingsDebounced(); }); + $("#confirm_message_delete").on('input', function () { + power_user.confirm_message_delete = !!$(this).prop('checked'); + saveSettingsDebounced(); + }); + $("#render_formulas").on("input", function () { power_user.render_formulas = !!$(this).prop('checked'); reloadMarkdownProcessor(power_user.render_formulas);