Skip to content

Commit 76695da

Browse files
committed
web/control: Fix to not flash before the last 60 seconds
1 parent cbe7ae2 commit 76695da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ async function timer_tick(id, endtime, duration, token) {
800800
fraction_remaining = remaining / duration
801801
if (fraction_remaining < .75) {
802802
fraction = fraction_remaining * 4 // 1 when started, 0 when out
803-
if (remaining % 2 == 0)
803+
if ((remaining > 60) || (remaining % 2 == 0))
804804
input.style.backgroundColor = `hsl(288, 100%, ${Math.max(50+50*fraction)}%)`
805805
else
806806
input.style.backgroundColor = null

0 commit comments

Comments
 (0)