aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/anki-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-01 10:00:59 -0500
committerGitHub <noreply@github.com>2024-02-01 15:00:59 +0000
commitdfd42bad0b46845ad88d1fdc5fa82b4f03bab0f3 (patch)
tree04686b943b84b33b8927238be17e4bc0dda7eb62 /ext/js/pages/settings/anki-controller.js
parent2356223942a21d1683ac38eed8e7b9485f453d87 (diff)
Application refactor (#591)
* Rename Yomitan class to Application, change initialization style * Rename file * Update init * Update config * Remove dead code
Diffstat (limited to 'ext/js/pages/settings/anki-controller.js')
-rw-r--r--ext/js/pages/settings/anki-controller.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js
index 09ab3c03..ae6a71db 100644
--- a/ext/js/pages/settings/anki-controller.js
+++ b/ext/js/pages/settings/anki-controller.js
@@ -26,7 +26,6 @@ import {getRequiredPermissionsForAnkiFieldValue, hasPermissions, setPermissionsG
import {querySelectorNotNull} from '../../dom/query-selector.js';
import {SelectorObserver} from '../../dom/selector-observer.js';
import {ObjectPropertyAccessor} from '../../general/object-property-accessor.js';
-import {yomitan} from '../../yomitan.js';
export class AnkiController {
/**
@@ -510,7 +509,7 @@ export class AnkiController {
let noteId = null;
for (const query of queries) {
- const notes = await yomitan.api.findAnkiNotes(query);
+ const notes = await this._settingsController.application.api.findAnkiNotes(query);
if (notes.length > 0) {
noteId = notes[0];
break;
@@ -521,7 +520,7 @@ export class AnkiController {
throw new Error('Could not find a note to test with');
}
- await yomitan.api.noteView(noteId, mode, false);
+ await this._settingsController.application.api.noteView(noteId, mode, false);
}
/**