summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-08-17 09:05:33 -0700
committerGitHub <noreply@github.com>2019-08-17 09:05:33 -0700
commit8ebac935e8c0ee167514d5726b1e2e16921e4957 (patch)
tree905897bbe19b754597b31b89332e09d45a163c5e /ext/bg/js/backend.js
parent1d25c8a744837b02b5d4364d93df65dd4d0b7ed6 (diff)
parent3a5b06bd1078d39cf9b29cbc05a0cde13c96ca94 (diff)
Merge pull request #182 from toasted-nutbread/anki-screenshot
Anki screenshot
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js12
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);
}
};