aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-10 16:05:17 -0400
committerGitHub <noreply@github.com>2020-09-10 16:05:17 -0400
commit892f7ed3b8d4a97dd7fd8086a404c5e8ea1355fb (patch)
treeccc4551b2dbef20193c85a946e61d8774873cad2 /ext/mixed/js/api.js
parent3dd4822ab3e1312336065f70cf31b87dac39473b (diff)
Anki note api functions (#802)
* Assign duplicateScope to a variable * Add api.addAnkiNote * Add api.getAnkiNoteInfo, update returned data format
Diffstat (limited to 'ext/mixed/js/api.js')
-rw-r--r--ext/mixed/js/api.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js
index 7dc77fb6..d9569187 100644
--- a/ext/mixed/js/api.js
+++ b/ext/mixed/js/api.js
@@ -77,6 +77,14 @@ const api = (() => {
return this._invoke('kanjiFind', {text, optionsContext});
}
+ addAnkiNote(note) {
+ return this._invoke('addAnkiNote', {note});
+ }
+
+ getAnkiNoteInfo(notes, duplicateScope) {
+ return this._invoke('getAnkiNoteInfo', {notes, duplicateScope});
+ }
+
definitionAdd(definition, mode, context, ownerFrameId, optionsContext) {
return this._invoke('definitionAdd', {definition, mode, context, ownerFrameId, optionsContext});
}