aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/anki-templates-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/anki-templates-controller.js')
-rw-r--r--ext/js/pages/settings/anki-templates-controller.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/ext/js/pages/settings/anki-templates-controller.js b/ext/js/pages/settings/anki-templates-controller.js
index 90e88f57..685c80d0 100644
--- a/ext/js/pages/settings/anki-templates-controller.js
+++ b/ext/js/pages/settings/anki-templates-controller.js
@@ -47,22 +47,8 @@ class AnkiTemplatesController {
const testRenderButton = document.querySelector('#anki-card-templates-test-render-button');
const resetButton = document.querySelector('#anki-card-templates-reset-button');
const resetConfirmButton = document.querySelector('#anki-card-templates-reset-button-confirm');
- const fieldList = document.querySelector('#anki-card-templates-field-list');
this._fieldTemplateResetModal = this._modalController.getModal('anki-card-templates-reset');
- const markers = new Set([
- ...this._ankiController.getFieldMarkers('terms'),
- ...this._ankiController.getFieldMarkers('kanji')
- ]);
-
- if (fieldList !== null) {
- const fragment = this._ankiController.getFieldMarkersHtml(markers);
- fieldList.appendChild(fragment);
- for (const node of fieldList.querySelectorAll('.marker-link')) {
- node.addEventListener('click', this._onMarkerClicked.bind(this), false);
- }
- }
-
this._fieldTemplatesTextarea.addEventListener('change', this._onChanged.bind(this), false);
testRenderButton.addEventListener('click', this._onRender.bind(this), false);
resetButton.addEventListener('click', this._onReset.bind(this), false);
@@ -122,11 +108,6 @@ class AnkiTemplatesController {
this._validate(this._compileResultInfo, '{expression}', 'term-kanji', false, true);
}
- _onMarkerClicked(e) {
- e.preventDefault();
- this._renderFieldInput.value = `{${e.target.textContent}}`;
- }
-
_onRender(e) {
e.preventDefault();