From ec58d9272a690c8af55e05817ebdf3f70e221458 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Wed, 26 Jun 2024 05:46:34 +0200 Subject: [PATCH] Move ctrl+enter regenerate to new popup --- public/scripts/RossAscends-mods.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index b37cea4e5..b2d97ff97 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -16,7 +16,6 @@ import { eventSource, menu_type, substituteParams, - callPopup, sendTextareaMessage, } from '../script.js'; @@ -1004,20 +1003,21 @@ export function initRossMods() { if (skipConfirm) { doRegenerate(); } else { - const popupText = ` -
Are you sure you want to regenerate the latest message?
- `; - callPopup(popupText, 'confirm').then(result => { - if (!result) { - return; - } - const regenerateWithCtrlEnter = $('#regenerateWithCtrlEnter').prop('checked'); - SaveLocal(skipConfirmKey, regenerateWithCtrlEnter); - doRegenerate(); - }); + Popup.show.confirm('Regenerate Message', ` + Are you sure you want to regenerate the latest message? + `, { + onClose: (popup) => { + if (!popup.result) { + return; + } + const regenerateWithCtrlEnter = $('#regenerateWithCtrlEnter').prop('checked'); + SaveLocal(skipConfirmKey, regenerateWithCtrlEnter); + doRegenerate(); + }, + }) } return; } else {