From 580983b9b8a17965db1466aa08cad3c96b06022e Mon Sep 17 00:00:00 2001 From: StefanVukovic99 Date: Fri, 29 Dec 2023 04:02:51 +0100 Subject: search resolution option (#436) * add search resolution setting * move finding next substring to method * use regex literal * fix comments * fix comments * add options update function * update test --- ext/js/data/options-util.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ext/js/data') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index c219bed3..eb9af9b6 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -555,7 +555,8 @@ export class OptionsUtil { {async: false, update: this._updateVersion18.bind(this)}, {async: false, update: this._updateVersion19.bind(this)}, {async: false, update: this._updateVersion20.bind(this)}, - {async: true, update: this._updateVersion21.bind(this)} + {async: true, update: this._updateVersion21.bind(this)}, + {async: false, update: this._updateVersion22.bind(this)} ]; /* eslint-enable no-multi-spaces */ if (typeof targetVersion === 'number' && targetVersion < result.length) { @@ -1173,6 +1174,18 @@ export class OptionsUtil { return options; } + /** + * @type {import('options-util').ModernUpdateFunctionAsync} + */ + _updateVersion22(options) { + // Added translation.searchResolution + for (const {options: profileOptions} of options.profiles) { + profileOptions.translation.searchResolution = 'letter'; + } + + return options; + } + /** * @param {string} url * @returns {Promise} -- cgit v1.2.3