aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/js/pages/settings/anki-controller.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js
index de8b2c39..1be41490 100644
--- a/ext/js/pages/settings/anki-controller.js
+++ b/ext/js/pages/settings/anki-controller.js
@@ -123,6 +123,8 @@ export class AnkiController {
for (const node of nodes) {
node.addEventListener('settingChanged', onAnkiSettingChanged);
}
+ const ankiCardFormatSettingsEntry = querySelectorNotNull(document, '[data-modal-action="show,anki-cards"]');
+ ankiCardFormatSettingsEntry.addEventListener('click', onAnkiSettingChanged);
}
/**
@@ -606,17 +608,6 @@ class AnkiCardController {
this._ankiCardFieldsContainer = this._node.querySelector('.anki-card-fields');
- /** @type {HTMLTextAreaElement} */
- const mainSettingsEntry = querySelectorNotNull(document, '[data-modal-action="show,anki-cards"]');
- mainSettingsEntry.addEventListener('click', (() => {
- const updatedCardOptions = this._getCardOptions(ankiOptions, this._optionsType);
- if (updatedCardOptions === null) { return; }
- this._deckController.prepare(deckControllerSelect, updatedCardOptions.deck);
- this._modelController.prepare(modelControllerSelect, updatedCardOptions.model);
- this._fields = updatedCardOptions.fields;
- void this.updateAnkiState();
- }).bind(this), false);
-
this._setupFields();
this._eventListeners.addEventListener(this._deckController.select, 'change', this._onCardDeckChange.bind(this), false);