mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add checkbox for restoring user input on page refresh
This commit is contained in:
@ -223,6 +223,7 @@ let power_user = {
|
||||
servers: [],
|
||||
bogus_folders: false,
|
||||
aux_field: 'character_version',
|
||||
restore_user_input: true,
|
||||
};
|
||||
|
||||
let themes = [];
|
||||
@ -1380,6 +1381,7 @@ function loadPowerUserSettings(settings, data) {
|
||||
$('#chat_width_slider').val(power_user.chat_width);
|
||||
$("#token_padding").val(power_user.token_padding);
|
||||
$("#aux_field").val(power_user.aux_field);
|
||||
$("#restore_user_input").prop("checked", power_user.restore_user_input);
|
||||
|
||||
$("#chat_truncation").val(power_user.chat_truncation);
|
||||
$('#chat_truncation_counter').val(power_user.chat_truncation);
|
||||
@ -3054,6 +3056,11 @@ $(document).ready(() => {
|
||||
printCharacters(false);
|
||||
});
|
||||
|
||||
$('#restore_user_input').on('input', function () {
|
||||
power_user.restore_user_input = !!$(this).prop('checked');
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
$(document).on('click', '#debug_table [data-debug-function]', function () {
|
||||
const functionId = $(this).data('debug-function');
|
||||
const functionRecord = debug_functions.find(f => f.functionId === functionId);
|
||||
|
Reference in New Issue
Block a user