diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-07 13:58:19 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-10 20:09:33 -0400 |
commit | bc8793eb56b2ce985f2e5dc0a9fd270f98fbf17a (patch) | |
tree | b390bf63356b1584ea6d9bb5ff98450d96fb0e04 /ext/fg/js/api.js | |
parent | 99ca60d4c1456f243d8142b4502db441e33340a4 (diff) |
Add a context object for all calls to fetch options
Diffstat (limited to 'ext/fg/js/api.js')
-rw-r--r-- | ext/fg/js/api.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js index aa3b2629..d0ac649a 100644 --- a/ext/fg/js/api.js +++ b/ext/fg/js/api.js @@ -17,24 +17,24 @@ */ -function apiOptionsGet() { - return utilInvoke('optionsGet'); +function apiOptionsGet(optionsContext) { + return utilInvoke('optionsGet', {optionsContext}); } -function apiTermsFind(text) { - return utilInvoke('termsFind', {text}); +function apiTermsFind(text, optionsContext) { + return utilInvoke('termsFind', {text, optionsContext}); } -function apiKanjiFind(text) { - return utilInvoke('kanjiFind', {text}); +function apiKanjiFind(text, optionsContext) { + return utilInvoke('kanjiFind', {text, optionsContext}); } -function apiDefinitionAdd(definition, mode, context) { - return utilInvoke('definitionAdd', {definition, mode, context}); +function apiDefinitionAdd(definition, mode, context, optionsContext) { + return utilInvoke('definitionAdd', {definition, mode, context, optionsContext}); } -function apiDefinitionsAddable(definitions, modes) { - return utilInvoke('definitionsAddable', {definitions, modes}).catch(() => null); +function apiDefinitionsAddable(definitions, modes, optionsContext) { + return utilInvoke('definitionsAddable', {definitions, modes, optionsContext}).catch(() => null); } function apiNoteView(noteId) { |