MediaWiki talk:Gadget-UTCLiveClock.js

Update February 2011
I've updated the script to be fully compatible with Vector and 1.17 while still being compatible with Monobook and 1.16. It has been tested in the following set-ups: See also 74740. Krinkle 14:57, 1 February 2011 (UTC)
 * 1.16wmf4 Vector (MediaWiki.org)
 * 1.16wmf4 Monobook (MediaWiki.org)
 * 1.17alpha Vector (prototype)
 * 1.17alpha Monobook (prototype)
 * trunk Vector (TranslateWiki)
 * trunk Monobook (TranslateWiki)
 * I already did it attranslatewiki:MediaWiki:Gadget-UTCLiveClock.jsMax Semenik 15:07, 1 February 2011 (UTC)
 * I didn't see that but now that I see it, I must say that it doesn't work (function showTime is not defined when the ready-statement fires early) and it still removes the tag, which was kindof the main bug. 15:21, 1 February 2011 (UTC)
 * Heh, someone broke it. Again. Max Semenik 18:55, 1 February 2011 (UTC)

Use on a Style-sheet
Would this code work, for all users on compatible skins, if simply placed on MediaWiki:Common.js? --George2001hi 09:48, 26 April 2011 (UTC)

Documentation for gadget authors
We're trying to start a library for gadget authors to use. Please check it out and post any questions or comments there. -- ☠ MarkAHershberger ☢ (talk) ☣ 01:40, 9 March 2012 (UTC)

Improvment of the clock gadget
This gadget and other clocks have the common problem of skipping some seconds : for example, the clock may display 11:20:35 just after 11:20:33 (skipping 11:20:34). It occurs because display function may be called at bad moment within the second (for the previous example at 11:20:33.995 then at 11:20:35.005).

I propose to improve the gadget by using the millisecond value to schedule next execution at hh:mm:ss.100 which give enough time (900ms) to execute the display function.

In the showTime function : --DavidL (talk) 11:04, 23 June 2012 (UTC)