Skip to content

Commit

Permalink
Reset the progress bar if it already completed
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Jul 17, 2024
1 parent a9fa5af commit ca09719
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,15 @@
let marketProgressBar;

function increaseMarketProgressMax() {
marketProgressBar.max += 1;
let value = marketProgressBar.max;

// Reset the progress bar if it already completed
if (marketProgressBar.value === value) {
marketProgressBar.value = 0;
value = 0;
}

marketProgressBar.max = value + 1;
marketProgressBar.removeAttribute('hidden');
}

Expand Down

0 comments on commit ca09719

Please sign in to comment.