User:Mfaizsyahmi/global.js

importScriptPage( 'PurgeButton/code.js', 'dev' ); importScriptPage( 'SkinSwitchButton/code.js', 'dev' ); importScriptPage( 'BackToTopButton/code.js', 'dev' );

// Customized LiveClock from dev // Changes: display in toolbar, local time default, href to toggle to utc function liveClock { var link = 'javascript:showtime(true)'; if ( skin === 'monobook' ) { $( 'div .toolbar' ).append( ' ' ); } else if ( skin === 'oasis' ) { $( '#WikiaPage #WikiHeader div.buttons' ).prepend( '  ' ); } //	$( '#utcdate' ).css( { fontSize: 'larger', fontWeight: 'bolder', textTransform: 'none' } ); showTime(false); } $( liveClock ); function showTime(utc) { var	now = new Date, months = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], if utc==true { hh = now.getUTCHours, mm = now.getUTCMinutes, ss = now.getUTCSeconds, dd = now.getUTCDate, month = months[now.getUTCMonth], year  = now.getUTCFullYear, zone  = ' (UTC)' var link = 'javascript:showtime(false)'; }	else { hh = now.getHours, mm = now.getMinutes, ss = now.getSeconds, dd = now.getDate, month = months[now.getMonth], year  = now.getFullYear, zone  = ' (local)' var link = 'javascript:showtime(true)'; }	time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss ) + ', ' + ( dd < 10 ? '0' + dd : dd ) + ' ' + month + ' ' + year + zone; $( '#toolbardate a' ).text( time ); $( '#toolbardate a' ).href( time ); window.setTimeout( showTime, 1000 ); } //