Jump to content

User:Ryulong/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//IMPORTS
importScript('User:Voice_of_All/Addtabs/monobook.js');
importScript('User:Voice_of_All/History/monobook.js');
 
importScript('User:Lightdarkness/aiv.js');

importScript('User:PiRSquared17/nosecure.js');

// Replace txt
importScript('User:Voice_of_All/replacetxt.js');

var myclock = {
	//A clock that autoupdates
	loadclock : function ()
	{
	  //monobook
	    if (document.getElementById('pt-userpage'))
	      {
	      	mw.util.addPortletLink(
	      		'p-personal',
	      		wgScript + '?action=purge&title=' + encodeURIComponent( mw.config.get( 'wgPageName' ) ),
	      		'Current time',
	      		'utcdate',
	      		'Purge'
	      		);
		    myclock.showtime();
	      }
	},
	
	showtime : function ()
	{
	    var timerID;
	    var now = new Date();
	    var timeValue = now.toUTCString().substring(0,22) + " UTC";
	    if (document.getElementById('utcdate'))
	      {document.getElementById('utcdate').firstChild.innerHTML = timeValue;}
	    timerID = setTimeout(myclock.showtime, 1000);
	}
};
//From the user scripts project
$( myclock.loadclock );