diff options
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index ded343c7..2e772aa1 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -27,13 +27,12 @@ * JsonSchema * Mecab * ObjectPropertyAccessor + * OptionsUtil * TemplateRenderer * Translator * conditionsTestValue * dictTermsSort * jp - * optionsLoad - * optionsSave * profileConditionsDescriptor * profileConditionsDescriptorPromise * requestJson @@ -202,7 +201,7 @@ class Backend { this._optionsSchema = await requestJson(chrome.runtime.getURL('/bg/data/options-schema.json'), 'GET'); this._defaultAnkiFieldTemplates = (await requestText(chrome.runtime.getURL('/bg/data/default-anki-field-templates.handlebars'), 'GET')).trim(); - this._options = await optionsLoad(); + this._options = await OptionsUtil.load(); this._options = JsonSchema.getValidValueOrDefault(this._optionsSchema, this._options); this._applyOptions('background'); @@ -396,7 +395,7 @@ class Backend { async _onApiOptionsSave({source}) { const options = this.getFullOptions(); - await optionsSave(options); + await OptionsUtil.save(options); this._applyOptions(source); } |