diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-08-15 19:39:58 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-08-15 19:39:58 -0400 |
commit | 0f0adf750c8cde668cdcf369cbe0ac173a9edf3f (patch) | |
tree | ac33e7efb308f06444a18feb535aab7fba6fd45f /ext/bg/js/backend.js | |
parent | e23d4b9a82581f3cf1118e31d077fc9cdaff7573 (diff) |
Add ability to save screenshot to anki cards
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r-- | ext/bg/js/backend.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index c191a150..d49286d0 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -94,8 +94,8 @@ class Backend { forward(apiTermsFind(text), callback); }, - definitionAdd: ({definition, mode, callback}) => { - forward(apiDefinitionAdd(definition, mode), callback); + definitionAdd: ({definition, mode, context, callback}) => { + forward(apiDefinitionAdd(definition, mode, context), callback); }, definitionsAddable: ({definitions, modes, callback}) => { @@ -116,6 +116,14 @@ class Backend { audioGetUrl: ({definition, source, callback}) => { forward(apiAudioGetUrl(definition, source), callback); + }, + + screenshotGet: ({options}) => { + forward(apiScreenshotGet(options, sender), callback); + }, + + forward: ({action, params}) => { + forward(apiForward(action, params, sender), callback); } }; |