User:Bot ishmael/monaco.js

function openUserMenu(event) { event.stopPropagation; if($('#headerMenuUser').exists) { $("#headerMenuUser").makeHeaderMenu("headerButtonUser",openUserMenu,{attach_to:"#userData",attach_at:"bottom"}); } else { $.get(wgScript+'?action=ajax&rs=GetUserMenu&rsargs[]='+wgUserName+'&uselang='+wgUserLanguage+'&cb='+wgMWrevId+'-'+wgStyleVersion,          function(html) {             $("#positioned_elements").append(html);             $("#headerMenuUser").makeHeaderMenu("headerButtonUser",openUserMenu,{attach_to:"#userData",attach_at:"bottom"});             $('#cockpit1').click(WidgetFramework.show_cockpit);             $("#headerMenuUser").click(function(e){if(e.target.nodeName=="A"){$.tracker.byStr('userMenu/'+$(e.target).attr('id'));};});           }    ); } } $("#headerButtonUser").bind("click.headerMenu",openUserMenu);

function restoreWatchlistLink { var wlLink      = document.getElementById('menuMyFollowing'); wlLink.href     = '/wiki/Special:Watchlist'; wlLink.title    = 'Your watchlist'; wlLink.innerHTML = "My watchlist"; } $("#headerButtonUser").bind("click.headerMenu",restoreWatchlistLink);

function displayTimer { if ( typeof( timerDisplay ) !== 'undefined' && timerDisplay === false ) return; var date; var timerParent = document.getElementById( 'userData' ); var timerLink  = document.createElement( 'a' ); var timerObj   = document.createElement( 'span' ); timerLink.href              = '/wiki/' + wgPageName + '?action=purge'; timerLink.title             = 'Purge the server cache and update the contents of this page.' timerObj.id                 = 'pt-timer'; timerObj.style.textTransform = 'none'; timerObj.style.fontWeight   = 'bold'; timerObj.style.fontSize     = '110%'; timerObj.appendChild( timerLink ); timerParent.insertBefore( timerObj, timerParent.firstChild ); function actualizeUTC {   timerDate           = new Date; timerLink.innerHTML = ( timerDate.getUTCHours  < 10 ? '0' : '' ) + timerDate.getUTCHours   + ':' + ( timerDate.getUTCMinutes < 10 ? '0' : '' ) + timerDate.getUTCMinutes + ':' + ( timerDate.getUTCSeconds < 10 ? '0' : '' ) + timerDate.getUTCSeconds + ' (UTC)'; } function actualizeCustom {   timerDate           = new Date; timerDate.setMinutes( timerDate.getMinutes + timerDate.getTimezoneOffset + timerTimezone * 60 ); timerLink.innerHTML = ( timerDate.getHours  < 10 ? '0' : '' ) + timerDate.getHours   + ':' + ( timerDate.getMinutes < 10 ? '0' : '' ) + timerDate.getMinutes + ':' + ( timerDate.getSeconds < 10 ? '0' : '' ) + timerDate.getSeconds + ' (UTC' + ( timerTimezone < 0 ? '' : '+' ) + timerTimezone + ')'; } // start if ( typeof( timerTimezone ) !== 'number' ) {   actualizeUTC; setInterval( actualizeUTC, 1000 ); } else {   actualizeCustom; setInterval( actualizeCustom, 1000 ); } } addOnloadHook(displayTimer);