User:Fewfre/global.js/showServerTime.js

/* This Javascript inputs a clock next to the user navigation at the top of the page. */ /* Originally from: http://tardis.wikia.com/wiki/MediaWiki:Common.js/displayTimer.js */

var refreshDate; function showTime { var	now = new Date, hh = now.getUTCHours, mm = now.getUTCMinutes, time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ); $('#displayTimer').empty.append('' + time + ''); window.clearTimeout(refreshDate); refreshDate = window.setTimeout(showTime, 1000); } $(document).ready(function {   if (skin == 'oasis')         $('').appendTo('#AccountNavigation');    else        $('#p-personal ul').prepend('');    showTime;    refreshDate = window.setTimeout(showTime, 1000);    $('#displayTimer').css({ color: '#FFF', fontWeight: 'normal', fontSize: '10px', letterSpacing: '2px', marginLeft: '3px' }) });