- added edit message auto saving

- toggle in PowerUser settings
- removed consolelog spam from RA-mods and expressions
This commit is contained in:
RossAscends
2023-04-21 02:14:16 +09:00
parent d452467818
commit 03b3fc9fc1
5 changed files with 65 additions and 42 deletions

View File

@ -59,6 +59,7 @@ let power_user = {
sheld_width: sheld_width.DEFAULT,
play_message_sound: false,
play_sound_unfocused: true,
auto_save_msg_edits: false,
sort_field: 'name',
sort_order: 'asc',
font_scale: 1,
@ -307,6 +308,7 @@ function loadPowerUserSettings(settings, data) {
$("#multigen_next_chunks").val(power_user.multigen_next_chunks);
$("#play_message_sound").prop("checked", power_user.play_message_sound);
$("#play_sound_unfocused").prop("checked", power_user.play_sound_unfocused);
$("#auto_save_msg_edits").prop("checked", power_user.auto_save_msg_edits);
$(`input[name="avatar_style"][value="${power_user.avatar_style}"]`).prop("checked", true);
$(`input[name="chat_display"][value="${power_user.chat_display}"]`).prop("checked", true);
$(`input[name="sheld_width"][value="${power_user.sheld_width}"]`).prop("checked", true);
@ -573,6 +575,11 @@ $(document).ready(() => {
saveSettingsDebounced();
});
$("#auto_save_msg_edits").on('input', function () {
power_user.auto_save_msg_edits = !!$(this).prop('checked');
saveSettingsDebounced();
});
$("#character_sort_order").on('change', function () {
power_user.sort_field = $(this).find(":selected").data('field');
power_user.sort_order = $(this).find(":selected").data('order');