diff options
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 54e8ff08..66f80351 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -1958,6 +1958,13 @@ class Backend { this._applyOptions(source); } + /** + * Creates an options object for use with `Translator.findTerms`. + * @param {string} mode The display mode for the dictionary entries. + * @param {{matchType: string, deinflect: boolean}} details Custom info for finding terms. + * @param {object} options The options. + * @returns {FindTermsOptions} An options object. + */ _getTranslatorFindTermsOptions(mode, details, options) { let {matchType, deinflect} = details; if (typeof matchType !== 'string') { matchType = 'exact'; } @@ -2006,6 +2013,11 @@ class Backend { }; } + /** + * Creates an options object for use with `Translator.findKanji`. + * @param {object} options The options. + * @returns {FindKanjiOptions} An options object. + */ _getTranslatorFindKanjiOptions(options) { const enabledDictionaryMap = this._getTranslatorEnabledDictionaryMap(options); return {enabledDictionaryMap}; |