aboutsummaryrefslogtreecommitdiff
path: root/ext/js/display/display-anki.js
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-12 02:16:11 +0000
committerGitHub <noreply@github.com>2023-11-12 02:16:11 +0000
commitd06029ea8c4244f40f9ddfeec5154f9ef2a4c053 (patch)
tree93f3e15603ec38faef01070475904c08d2e9280b /ext/js/display/display-anki.js
parentf263e994c6eca2438eaff79cb22f1b48fe14b7b2 (diff)
parent784dcd93b02443bc253e3af43ad0586a1add39c5 (diff)
Merge pull request #314 from starxeras/replace-yomichan
Replace all instances of yomichan
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' ?