#1242 Add aux field selector

This commit is contained in:
Cohee
2023-11-11 18:25:43 +02:00
parent 5331b5dc8a
commit 91a1cc81a0
3 changed files with 21 additions and 4 deletions

View File

@ -220,6 +220,7 @@ let power_user = {
encode_tags: false,
servers: [],
bogus_folders: false,
aux_field: 'character_version',
};
let themes = [];
@ -1255,6 +1256,7 @@ function loadPowerUserSettings(settings, data) {
$(`#chat_display option[value=${power_user.chat_display}]`).attr("selected", true).trigger('change');
$('#chat_width_slider').val(power_user.chat_width);
$("#token_padding").val(power_user.token_padding);
$("#aux_field").val(power_user.aux_field);
$("#font_scale").val(power_user.font_scale);
$("#font_scale_counter").val(power_user.font_scale);
@ -2822,6 +2824,13 @@ $(document).ready(() => {
printCharacters(true);
});
$('#aux_field').on('change', function() {
const value = $(this).find(':selected').val();
power_user.aux_field = String(value);
saveSettingsDebounced();
printCharacters(false);
});
$(document).on('click', '#debug_table [data-debug-function]', function () {
const functionId = $(this).data('debug-function');
const functionRecord = debug_functions.find(f => f.functionId === functionId);