This is the documentation for the DavidClock user script.
This script puts an UTC clock in the upper right corner of all pages, like this:
- ... my talk my preferences my watchlist my contributions log out 10:25 10:22 22 oct
It can show one or several of these things:
- A ticking clock in UTC time. Same time as the Wikipedia servers use.
- A static clock that shows when the page was loaded.
- A static date that shows when the page was loaded.
Note that this clock runs of your local computer clock. If you have the wrong time in your computer then this clock will also be wrong.
To use this script put this code in your personal /monobook.js page:
Then you need to wait a minute and then bypass your browser cache to load the clock the first time.
The default is to show both the ticking and the static clock, and the clock ticks once a minute. This can be changed by adding one of the lines below to your "/monobook.js" page:
Don't set below 60 seconds on slow computers.
The current default is to show the date. To disable or enable the date add one of the lines below to your "/monobook.js" page:
We might change this default if people don't like it. Tell me what you think on my talk page. The reason we use 0/1 instead of false/true is that we might want to add more date styles later on, then we might need "window.davidClockDate = 2;" and so on.
Tested and works in Firefox 2.0, Opera 9.02 and Internet Explorer 5.5.
Works in the following Wikipedia skins: MonoBook, Chick, Modern, MySkin, Simple. Has no effect in the other skins.
Only thing that runs on each tick is the small inner function
updateTimeSeconds(), thus very efficient.
- User:Davidgothberg/newmessageshistory – Another nifty user script made by David.
- Wikipedia:WikiProject User scripts/Scripts – Lots of other user scripts.