AnkiNoteTemplate/templates/Japanese Mined Sentences (cyphar)/Production/front.html
Nikolay Belikov a1c77ec29a Update templates to support marking target word with <strong>
Anki 2.1.50 brought a change to the WYSIWYG note editor.  Previously,
pressing `Control+b` or the `Bold text` button wrapped the selection in
a `<b>` tag, and the latest update changed it to `<strong>`, therefore
breaking scripts and styles for newly added notes.  This patch adds
support for the new tag in affected templates.
2022-04-17 17:53:26 +03:00

21 lines
671 B
HTML

{{#MakeProductionCard}}
{{#SentKanji}}
<header>{{#Tags}}<div class="tags">{{Tags}}</div>{{/Tags}}</header>
{{#Image}}<div class="images" >{{Image}}</div>{{/Image}}
<div class="jpsentence production">{{furigana:SentFurigana}}</div>
<div style="text-align: center;">{{VocabAudio}}{{SentAudio}}</div>
<script>
document.addEventListener('DOMContentLoaded', threeDots(), false);
function threeDots() {
for (hidden of document.querySelectorAll(".production b, .production strong")) {
hidden.style.visibility = "visible";
hidden.innerText = "【" + hidden.innerText.replace(/[^ぁ-んァ-ン]/g, "") + "】";
}
}
</script>
{{/SentKanji}}
{{/MakeProductionCard}}