aboutsummaryrefslogtreecommitdiff
path: root/anki-card-template/card.js
diff options
context:
space:
mode:
Diffstat (limited to 'anki-card-template/card.js')
-rw-r--r--anki-card-template/card.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/anki-card-template/card.js b/anki-card-template/card.js
index 23dab93..193e7fe 100644
--- a/anki-card-template/card.js
+++ b/anki-card-template/card.js
@@ -419,6 +419,15 @@ function run() {
document.getElementById("sentence-translation").classList.add("visible");
}
+ // replace ugly anki play icon with material design icon
+ for (var el of document.querySelectorAll("#audio .replay-button")) {
+ el.innerHTML = document.getElementById("play-icon").outerHTML;
+ el.children[0].classList.remove("display-none");
+ }
+
+ var audio = document.getElementById("audio");
+ if (audio.innerText.trim() == "noaudio") audio.classList.add("display-none");
+
layout();
}