summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-14 23:41:48 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-14 23:41:48 +0000
commit92438716adebe949e939d23b933d852e520c2057 (patch)
treec33e9bf2f8a4106ab4ea8fc0a0a3bac55f1055f0 /js/Article.js
parent3ff3c605b4405dcd66c6ae978566664633a2f68e (diff)
minor: remove classes better in 'Article.setScore()'
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/js/Article.js b/js/Article.js
index f662abaf2..b132bb4be 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -46,12 +46,7 @@ const Article = {
pic.innerHTML = Article.getScorePic(score);
pic.setAttribute("title", score);
- ["score-low", "score-high", "score-half-low", "score-half-high", "score-neutral"]
- .forEach(function(scl) {
- if (row.classList.contains(scl))
- row.classList.remove(scl);
- });
-
+ row.classList.remove('score-low', 'score-high', 'score-half-low', 'score-half-high', 'score-neutral');
row.classList.add(Article.getScoreClass(score));
}
});