diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 9e3bee605..d5ced194c 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -534,6 +534,11 @@ async function applyTheme(name) { { key: 'chat_width', action: async () => { + // If chat width is not set, set it to 50 + if (!power_user.chat_width) { + power_user.chat_width = 50; + } + localStorage.setItem(storage_keys.chat_width, power_user.chat_width); applyChatWidth(); } @@ -660,6 +665,10 @@ function loadPowerUserSettings(settings, data) { power_user.waifuMode = false; } + if (power_user.chat_width === '') { + power_user.chat_width = 50; + } + $('#trim_spaces').prop("checked", power_user.trim_spaces); $('#continue_on_send').prop("checked", power_user.continue_on_send); $('#auto_swipe').prop("checked", power_user.auto_swipe); @@ -1151,10 +1160,10 @@ async function resetMovablePanels(type) { //if happening as part of preset application, do it quietly. if (type === 'quiet') { return - //if happening due to resize, tell user. + //if happening due to resize, tell user. } else if (type === 'resize') { toastr.warning('Panel positions reset due to zoom/resize'); - //if happening due to manual button press + //if happening due to manual button press } else { toastr.success('Panel positions reset'); }