AnkiNoteTemplate/templates/Japanese fallback/Production/front.html

27 lines
859 B
HTML
Raw Normal View History

2021-11-27 14:47:23 +00:00
{{#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() {
const sent = document.getElementsByClassName("production")[0];
if (sent) {
const hidden = sent.getElementsByTagName("b");
for (i = 0; i < hidden.length; i++) {
if (hidden[i]) {
hidden[i].style.visibility = "visible";
//hidden[i].innerText = "【{{kana:VocabFurigana}}】";
hidden[i].innerText = "【"+hidden[i].innerText.replace(/[^ぁ-んァ-ン]/g, "")+"】";
}
}
}
}
</script>
{{/SentKanji}}
{{/MakeProductionCard}}