From 73156ac666ffe9916ef58d50f434741a695d8e84 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 20 Jan 2023 23:25:25 +0100 Subject: check if empty instead of innerHTML check --- anki-card-template/card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'anki-card-template') diff --git a/anki-card-template/card.js b/anki-card-template/card.js index d3efe29..f8dbcac 100644 --- a/anki-card-template/card.js +++ b/anki-card-template/card.js @@ -117,7 +117,7 @@ function run() { } // remove spoiler from sentence translation if word reading field is empty - if(document.getElementById("target-word-reading").innerText.length == 0) { + if(document.getElementById("target-word-reading").classList.contains("empty")) { document.getElementById("sentence-translation").classList.remove("hidden"); } -- cgit v1.2.3