User:Duskey/monaco.js

if ((wgAction == 'view' || wgAction == 'purge') && wgCanonicalNamespace != 'Special') { $(document).ready(function {		var list = null;		if (skin == 'monobook') {			list = document.getElementById('p-tb').getElementsByTagName('ul')[0];		} else {			var lists = document.getElementById('link_box').getElementsByTagName('ul');			if (lists[0].getElementsByTagName('li').length <= lists[1].getElementsByTagName('li').length) {				list = lists[0];			} else {				list = lists[1];			}		}		var li = document.createElement('li');		var a = document.createElement('a');		a.href = wgScript + '?action=purge&title=' + encodeURIComponent(wgPageName);		a.appendChild(document.createTextNode('Purge this page'));		a.title = 'Clear the server cache of this page.';		li.appendChild(a);		list.insertBefore(li, list.firstChild);	}); }