From 892f7ed3b8d4a97dd7fd8086a404c5e8ea1355fb Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Thu, 10 Sep 2020 16:05:17 -0400 Subject: Anki note api functions (#802) * Assign duplicateScope to a variable * Add api.addAnkiNote * Add api.getAnkiNoteInfo, update returned data format --- ext/mixed/js/api.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ext/mixed/js/api.js') 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}); } -- cgit v1.2.3