diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-09 17:48:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 17:48:27 -0400 |
commit | 8c68fa4d9435b562ffe23df92a2b7b620a0ed78e (patch) | |
tree | 8c622fe11063b3f9694033f10e47b2ac05badccc /ext/js/pages | |
parent | 0d167095479822adf1ed8918e3d1a349b3a53377 (diff) |
Anki text furigana parsing and {sentence-furigana} marker (#1814)
* Add support for textFurigana media
* Add readingMode parameter
* Implement readingMode
* Add {sentence-furigana} marker
* Fallback to sentence if furigana isn't available
* Update test data
Diffstat (limited to 'ext/js/pages')
-rw-r--r-- | ext/js/pages/settings/anki-controller.js | 2 | ||||
-rw-r--r-- | ext/js/pages/settings/anki-templates-controller.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/pages/settings/anki-controller.js b/ext/js/pages/settings/anki-controller.js index b98de1b6..c0f7f626 100644 --- a/ext/js/pages/settings/anki-controller.js +++ b/ext/js/pages/settings/anki-controller.js @@ -104,6 +104,7 @@ class AnkiController { 'search-query', 'selection-text', 'sentence', + 'sentence-furigana', 'tags', 'url' ]; @@ -123,6 +124,7 @@ class AnkiController { 'screenshot', 'search-query', 'selection-text', + 'sentence-furigana', 'sentence', 'stroke-count', 'tags', diff --git a/ext/js/pages/settings/anki-templates-controller.js b/ext/js/pages/settings/anki-templates-controller.js index aa565bad..ad2790ca 100644 --- a/ext/js/pages/settings/anki-templates-controller.js +++ b/ext/js/pages/settings/anki-templates-controller.js @@ -17,6 +17,7 @@ /* global * AnkiNoteBuilder + * JapaneseUtil */ class AnkiTemplatesController { @@ -32,7 +33,7 @@ class AnkiTemplatesController { this._renderFieldInput = null; this._renderResult = null; this._fieldTemplateResetModal = null; - this._ankiNoteBuilder = new AnkiNoteBuilder(); + this._ankiNoteBuilder = new AnkiNoteBuilder({japaneseUtil: new JapaneseUtil(null)}); } async prepare() { |