Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
amirkhan-ak-sf committed Jul 23, 2024
1 parent 190c061 commit 84b5eb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ async function sendMessage() {


function updateIndicators(categories) {
initializeIndicators();
categories.forEach(category => {
const indicator = document.getElementById(`${category.categoryName.toLowerCase()}-indicator`);
if (indicator) {
indicator.textContent = `${category.categoryName}: ${category.score.toString()}`; // Set the text content of the indicator to the category name and score
if (category.score === 0) {
indicator.classList.add('green');
indicator.classList.add('green' );
indicator.classList.remove('orange');
} else {
indicator.classList.add('orange');
Expand Down

0 comments on commit 84b5eb1

Please sign in to comment.