diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-04-03 13:32:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 13:32:53 -0400 |
commit | 0e26d9a667e2794346c8969a24d389eb45208df1 (patch) | |
tree | 815bd07d8216c1b9b88c8f7d6f341ab5259b6fd1 /ext/js/pages/settings/anki-templates-controller.js | |
parent | a9fe2d03b22a0dd5760019f1325a7a86ebb07b85 (diff) |
Remove code for old settings page (#1588)
Diffstat (limited to 'ext/js/pages/settings/anki-templates-controller.js')
-rw-r--r-- | ext/js/pages/settings/anki-templates-controller.js | 19 |
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(); |