summaryrefslogtreecommitdiff
path: root/ext/js/display/display-anki.js
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-12 11:19:43 +0900
committerGitHub <noreply@github.com>2023-11-12 11:19:43 +0900
commit47b4d79e646a990699a1a4ca1da559a4aeec1c91 (patch)
treec33f61ba85354f18c68d4a054baa30ff0c41c153 /ext/js/display/display-anki.js
parent9162d950eb2b3aa0339d95a98a60be89b8315f26 (diff)
parentd06029ea8c4244f40f9ddfeec5154f9ef2a4c053 (diff)
Merge branch 'master' into offscreen-db
Diffstat (limited to 'ext/js/display/display-anki.js')
-rw-r--r--ext/js/display/display-anki.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/js/display/display-anki.js b/ext/js/display/display-anki.js
index a25008a2..2f94e414 100644
--- a/ext/js/display/display-anki.js
+++ b/ext/js/display/display-anki.js
@@ -20,7 +20,7 @@ import {EventListenerCollection, deferPromise, isObject} from '../core.js';
import {AnkiNoteBuilder} from '../data/anki-note-builder.js';
import {AnkiUtil} from '../data/anki-util.js';
import {PopupMenu} from '../dom/popup-menu.js';
-import {yomichan} from '../yomichan.js';
+import {yomitan} from '../yomitan.js';
export class DisplayAnki {
constructor(display, displayAudio, japaneseUtil) {
@@ -377,7 +377,7 @@ export class DisplayAnki {
let noteId = null;
let addNoteOkay = false;
try {
- noteId = await yomichan.api.addAnkiNote(note);
+ noteId = await yomitan.api.addAnkiNote(note);
addNoteOkay = true;
} catch (e) {
allErrors.length = 0;
@@ -390,7 +390,7 @@ export class DisplayAnki {
} else {
if (this._suspendNewCards) {
try {
- await yomichan.api.suspendAnkiCardsForNote(noteId);
+ await yomitan.api.suspendAnkiCardsForNote(noteId);
} catch (e) {
allErrors.push(e);
}
@@ -475,7 +475,7 @@ export class DisplayAnki {
templates = this._ankiFieldTemplatesDefault;
if (typeof templates === 'string') { return templates; }
- templates = await yomichan.api.getDefaultAnkiFieldTemplates();
+ templates = await yomitan.api.getDefaultAnkiFieldTemplates();
this._ankiFieldTemplatesDefault = templates;
return templates;
}
@@ -505,12 +505,12 @@ export class DisplayAnki {
let ankiError = null;
try {
if (forceCanAddValue !== null) {
- if (!await yomichan.api.isAnkiConnected()) {
+ if (!await yomitan.api.isAnkiConnected()) {
throw new Error('Anki not connected');
}
infos = this._getAnkiNoteInfoForceValue(notes, forceCanAddValue);
} else {
- infos = await yomichan.api.getAnkiNoteInfo(notes, fetchAdditionalInfo);
+ infos = await yomitan.api.getAnkiNoteInfo(notes, fetchAdditionalInfo);
}
} catch (e) {
infos = this._getAnkiNoteInfoForceValue(notes, false);
@@ -663,7 +663,7 @@ export class DisplayAnki {
const noteIds = this._getNodeNoteIds(node);
if (noteIds.length === 0) { return; }
try {
- await yomichan.api.noteView(noteIds[0], this._noteGuiMode, false);
+ await yomitan.api.noteView(noteIds[0], this._noteGuiMode, false);
} catch (e) {
const displayErrors = (
e.message === 'Mode not supported' ?