User:Mschel/monobook.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
If a message on your talk page led you here, please be wary of who left it. The code below could contain malicious content capable of compromising your account; if your account appears to be compromised, it will be blocked. If you are unsure of whether the code is safe, you can ask at the help desk.
// Script from [[User:Lupin/recent2.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></s'+'cript>'); +// Script from [[User:Lupin/autoedit.js]]' +importScript('User:Lupin/autoedit.js'); //[[User:Lupin/autoedit.js]]: importScript('User:AzaToth/morebits.js'); importScript('User:AzaToth/twinklefluff.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); importScript('User:AzaToth/twinklewarn.js'); importScript('User:AzaToth/twinklearv.js'); importScript('User:AzaToth/twinklespeedy.js'); importScript('User:AzaToth/twinklediff.js'); TwinkleConfig = { revertMaxRevisions : 50, userTalkPageMode : 'window', showSharedIPNotice : false, openTalkPage : [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert : false, openAOLAnonTalkPage : true, summaryAd : "", deletionSummaryAd : "", watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ], openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages : [ ], markRevertedPagesAsMinor : [ ], deleteTalkPageOnDelete : false, markWarningsAsMinor : false, markAIVReportAsMinor : false, markSpeedyPagesAsMinor : false, confirmUsernameToAIV : true }; // Add date and time to your monobook "personal menu" list at the very top of the page. // Created by [[User:Mathwiz2020]] // Indicate where you would like the time to appear: // 1 is first (before username), 2 is second (before talk link), ... 7 is last (after log out link) insertBeforeNum = 7; // Do NOT edit below this line unless you're experiened in javascript insertBeforeArr = new Array("","pt-userpage","pt-mytalk","pt-preferences","pt-watchlist","pt-mycontris","pt-logout",""); insertBefore = insertBeforeArr[insertBeforeNum]; function makeTime() { var li = document.createElement( 'li' ); li.id = 'pt-time'; var mySpan = document.createElement( 'span' ); mySpan.appendChild( document.createTextNode( 'date and time' ) ); li.appendChild( mySpan ); if ( insertBefore ) { var before = document.getElementById( insertBefore ); before.appendChild( li, before ); } else // append to end (right) of list { document.getElementById( 'pt-logout' ).parentNode.appendChild( li ); } getTime(); } if ( window.addEventListener ) window.addEventListener ( 'load', makeTime, false ); else if ( window.attachEvent ) window.attachEvent ( 'onload', makeTime ); function getTime() { var time = new Date(); var date = time.getUTCDate(); var months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '); month = months[time.getUTCMonth()]; var year = time.getUTCFullYear(); var hours = '0' + time.getUTCHours(); hours = hours.substr(hours.length-2, hours.length); var minutes = '0' + time.getUTCMinutes(); minutes = minutes.substr(minutes.length-2, minutes.length); var seconds = '0' + time.getUTCSeconds(); seconds = seconds.substr(seconds.length-2, seconds.length); var curTime = hours + ":" + minutes + ":" + seconds + ", " + date + " " + month + " " + year + " (UTC)"; datePlace = document.getElementById('pt-time').childNodes[0].childNodes[0]; datePlace.replaceData(0, datePlace.length, curTime); doTime = window.setTimeout("getTime()", 1000); } //