diff options
Diffstat (limited to 'card/card.js')
-rw-r--r-- | card/card.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/card/card.js b/card/card.js index ad744b7..e31564f 100644 --- a/card/card.js +++ b/card/card.js @@ -30,8 +30,12 @@ function parseSentence(input) { function run() { var sentences = document.getElementsByClassName("sentence"); - for (var sentence of sentences) + for (var sentence of sentences) { + if (sentence.classList.contains("parsed")) continue; sentence.innerHTML = parseSentence(sentence.innerText); + sentence.classList.add("parsed"); + } } run(); +window.onload = () => run(); |