User:Bot ishmael/monaco.js

$("#headerButtonUser").unbind("click.headerMenu",openUserMenu);

function openUserMenu(event) { event.stopPropagation; if($('#headerMenuUser').exists) { $("#headerMenuUser").makeHeaderMenu("headerButtonUser",openUserMenu,{attach_to:"#userData",attach_at:"bottom"}); } else { var html = '' +'   ' +'       My page' +'       My watchlist' +'       My contributions' +'       Manage widgets</li>' +'       <a accesskey="" title="Your preferences" href="/wiki/Special:Preferences" id="menuPreferences">Preferences</a></li>' +'   </ul>' +' ';   $("#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 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);