diff options
author | StefanVukovic99 <stefanvukovic44@gmail.com> | 2023-12-29 04:02:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 03:02:51 +0000 |
commit | 580983b9b8a17965db1466aa08cad3c96b06022e (patch) | |
tree | 914760e326ffc4b1acf8ddcddbd5006ae762babf /ext/js/data | |
parent | 8d5d2152e4295fdcefa6ef283204c92df1f81305 (diff) |
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
Diffstat (limited to 'ext/js/data')
-rw-r--r-- | ext/js/data/options-util.js | 15 |
1 files changed, 14 insertions, 1 deletions
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) { @@ -1174,6 +1175,18 @@ export class OptionsUtil { } /** + * @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<chrome.tabs.Tab>} */ |