diff options
author | starxeras <starxeras@gmail.com> | 2023-11-10 19:48:27 -0600 |
---|---|---|
committer | starxeras <starxeras@gmail.com> | 2023-11-10 19:48:27 -0600 |
commit | c4134168be8bf8df4e7ba4860e3d99b3c2256734 (patch) | |
tree | d397833c6d7aca11b9fa452d80f0c61089f59b64 /ext/js/display/display-anki.js | |
parent | dae82459073c18c903c0bb54c578476ed83dbfd8 (diff) |
`yomichan` -> `yomitan`
Diffstat (limited to 'ext/js/display/display-anki.js')
-rw-r--r-- | ext/js/display/display-anki.js | 14 |
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' ? |