User:Ryulong/monobook.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 );

function hidelog { if (mw.config.get('wgCanonicalSpecialPageName') === 'Watchlist') { var x = document.getElementsByTagName("li"); var z = new Array; for (var j = 0; j< x.length; j++) { var y = x[j].getElementsByTagName("a"); for (var k = 0; k< y.length; k++) { if (y[k].getAttribute("title") == "Special:Log/delete") { z[j] = 1 }     }    }    for (var i = 0; i< x.length; i++) { if (z[i] == 1) { x[i].id = "kill"; }   }  } }  addOnloadHook(hidelog);