Skip to content

Commit

Permalink
fixed fire emojis not reflecting the selected type
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcountss committed Sep 18, 2024
1 parent 2f0ce5f commit b43ac39
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion top50/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,18 @@ function update(doGains = true) {
document.getElementById("styles").innerHTML = ``;
}
for (let q = 0; q < data.fireIcons.created.length; q++) {
if (data.fireIcons.created[q].threshold <= data.data[i].count) {
let equation = false;
//either gain or total
if (data.fireIcons.type == 'total') {
if (data.data[i].count >= data.fireIcons.created[q].threshold) {
equation = true;
}
} else if (data.fireIcons.type == 'gain') {
if ((data.data[i].count - data.data[i].lastCount) >= data.fireIcons.created[q].threshold) {
equation = true;
}
}
if (equation) {
let icon = data.fireIcons.created[q].icon;
let fire = document.createElement('img');
fire.classList = 'fireIcon';
Expand Down Expand Up @@ -666,6 +677,8 @@ function update(doGains = true) {
} else {
currentCard.children[0].innerHTML = `<div>#${num}</div>`;
}
} else {
currentCard.children[0].innerHTML = `<div>#${num}</div>`;
}
}
} else {
Expand Down

0 comments on commit b43ac39

Please sign in to comment.