The attached patch will add a javascript countdown to the block, honoring the block accuracy setting.

It tries to be efficient by (1) firing the timer only as often as the block accuracy demands, (2) doesn't do any fancy math in the timer. The side effect of this is that the timer is not a "real-time" application.

For example, if the browser timer doesn't run when it should (which is bound to happen occassionally), the timer will decrement the interval (second) when in reality a little more time may have elapsed. If the accuracy is set to seconds and if the browser window is left open a long time, these mis-fires can add up to. That said, don't count on the timer to be exact! Other than that, it's a nice extension.

CommentFileSizeAuthor
#1 countdown_0.patch5.21 KBdouggreen
countdown.patch3.77 KBdouggreen

Comments

douggreen’s picture

StatusFileSize
new5.21 KB

Attached is an improved patch that also counts up, and properly switches from counting down to counting up.

stella’s picture

The attached patch works perfectly for me. Thanks Doug.

Cheers,
Stella

deekayen’s picture

Status: Needs review » Needs work

[dumb question removed]

deekayen’s picture

Status: Needs work » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.