From ca09719b0ea329dd86aa68819c5fd45cb55ecaab Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 17 Jul 2024 14:50:44 +0300 Subject: [PATCH] Reset the progress bar if it already completed --- code.user.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code.user.js b/code.user.js index acb3826..cd309c2 100644 --- a/code.user.js +++ b/code.user.js @@ -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'); }