Forum Moderators: open

Message Too Old, No Replies

Update Script Reset

         

almo136

2:24 pm on Apr 10, 2018 (gmt 0)

10+ Year Member



I found this script which I plan to use:
[github.com...]

There is one thing I would like to change. When the reset button is clicked I would like the main content to go back to "Click here to start" rather than showing the time.

Can anyone help with this?

csdude55

5:40 pm on Apr 25, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not familiar with the script, but looking at timer.js, go to line 31:

  reset: function () {
timer.stop();
timer.seconds = timer.initial;
if (typeof timer.callbacks.on_tick === "function")
timer.callbacks.on_tick(timer.human_time());
},


I think you could change it to:

  reset: function () {
timer.stop();
timer.seconds = timer.initial;
if (typeof timer.callbacks.on_tick === "function")
timer.callbacks.on_tick(timer.start());
},