summaryrefslogtreecommitdiff
path: root/ext/fg/js/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-15 19:39:58 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-08-15 19:39:58 -0400
commit0f0adf750c8cde668cdcf369cbe0ac173a9edf3f (patch)
treeac33e7efb308f06444a18feb535aab7fba6fd45f /ext/fg/js/api.js
parente23d4b9a82581f3cf1118e31d077fc9cdaff7573 (diff)
Add ability to save screenshot to anki cards
Diffstat (limited to 'ext/fg/js/api.js')
-rw-r--r--ext/fg/js/api.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js
index 4b4d9d74..0c86b412 100644
--- a/ext/fg/js/api.js
+++ b/ext/fg/js/api.js
@@ -33,8 +33,8 @@ function apiKanjiFind(text) {
return utilInvoke('kanjiFind', {text});
}
-function apiDefinitionAdd(definition, mode) {
- return utilInvoke('definitionAdd', {definition, mode});
+function apiDefinitionAdd(definition, mode, context) {
+ return utilInvoke('definitionAdd', {definition, mode, context});
}
function apiDefinitionsAddable(definitions, modes) {
@@ -53,6 +53,10 @@ function apiCommandExec(command) {
return utilInvoke('commandExec', {command});
}
-function apiAudioGetUrl(definition, source) {
- return utilInvoke('audioGetUrl', {definition, source});
+function apiScreenshotGet(options) {
+ return utilInvoke('screenshotGet', {options});
+}
+
+function apiForward(action, params) {
+ return utilInvoke('forward', {action, params});
}