minor: remove classes better in 'Article.setScore()'

This commit is contained in:
supahgreg 2025-10-14 23:41:48 +00:00
parent 3ff3c605b4
commit 92438716ad
No known key found for this signature in database

View File

@ -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));
}
});