Add debug function to toggle regeneration warning with Ctrl+Enter

f9e3666d23d13170f324b5536f47093de6de0399

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +5 -0Showing whitespace changes
public/script.js+5 -0
@@ -9360,6 +9360,11 @@ function addDebugFunctions() {
93609360 toastr.info('Event tracing is now ' + (localStorage.getItem('eventTracing') === 'true' ? 'enabled' : 'disabled'));
93619361 });
93629362
9363+ registerDebugFunction('toggleRegenerateWarning', 'Toggle Ctrl+Enter regeneration confirmation', 'Toggle the warning when regenerating a message with a Ctrl+Enter hotkey.', () => {
9364+ localStorage.setItem('RegenerateWithCtrlEnter', localStorage.getItem('RegenerateWithCtrlEnter') === 'true' ? 'false' : 'true');
9365+ toastr.info('Regenerate warning is now ' + (localStorage.getItem('RegenerateWithCtrlEnter') === 'true' ? 'disabled' : 'enabled'));
9366+ });
9367+
93639368 registerDebugFunction('copySetup', 'Copy ST setup to clipboard [WIP]', 'Useful data when reporting bugs', async () => {
93649369 const getContextContents = getContext();
93659370 const getSettingsContents = settings;