diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:41:48 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-14 23:41:48 +0000 |
| commit | 92438716adebe949e939d23b933d852e520c2057 (patch) | |
| tree | c33e9bf2f8a4106ab4ea8fc0a0a3bac55f1055f0 | |
| parent | 3ff3c605b4405dcd66c6ae978566664633a2f68e (diff) | |
minor: remove classes better in 'Article.setScore()'
| -rw-r--r-- | js/Article.js | 7 |
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)); } }); |