diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 3048ca76..93557f4c 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -206,7 +206,15 @@ export const allApplicationSettings = [ export const allDebugSettings = []; for (const k in globalConfig.debug) { if (!IS_DEBUG) break; - allDebugSettings.push(new BoolSetting("debug_" + k.replace(/([a-z])([A-Z])/g, (s, a, b) => `${a}_${b}`), categoryDebug, (app, value) => {if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value;})); + allDebugSettings.push( + new BoolSetting( + "debug_" + k.replace(/([a-z])([A-Z])/g, (s, a, b) => `${a}_${b}`), + categoryDebug, + (app, value) => { + if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value; + } + ) + ); } allApplicationSettings.push(...allDebugSettings); @@ -274,7 +282,10 @@ export class ApplicationSettings extends ReadWriteProxy { * @param {string} key */ getSetting(key) { - assert(key.startsWith("debug_") || this.getAllSettings().hasOwnProperty(key), "Setting not known: " + key); + assert( + key.startsWith("debug_") || this.getAllSettings().hasOwnProperty(key), + "Setting not known: " + key + ); return this.getAllSettings()[key]; } diff --git a/src/js/profile/setting_types.js b/src/js/profile/setting_types.js index fe95bbc5..152b8c51 100644 --- a/src/js/profile/setting_types.js +++ b/src/js/profile/setting_types.js @@ -187,7 +187,7 @@ export class BoolSetting extends BaseSetting { } getHtml() { - const label = T.settings.labels[this.id] || {title : this.id}; + const label = T.settings.labels[this.id] || { title: this.id }; return `
${this.enabled ? "" : standaloneOnlySettingHtml} diff --git a/src/js/states/settings.js b/src/js/states/settings.js index eb1f2e85..baa97c68 100644 --- a/src/js/states/settings.js +++ b/src/js/states/settings.js @@ -44,14 +44,16 @@ export class SettingsState extends TextualGameState { const hideDebug = IS_DEBUG ? "" : " style='display:none'"; for (let i = 0; i < allApplicationSettings.length; ++i) { const setting = allApplicationSettings[i]; - const hidden = allDebugSettings.indexOf(setting) != -1 && !globalConfig.debug.enableDebugSettings; + const hidden = allDebugSettings.indexOf(setting) != -1 && !globalConfig.debug.enableDebugSettings; if (setting.categoryId !== lastCategory) { lastCategory = setting.categoryId; if (i !== 0) { html += "
"; } - html += `${T.settings.categories[lastCategory]}`; + html += `${ + T.settings.categories[lastCategory] + }`; html += `
`; }