User:Ligulem/monobook.js

/*

/* Making "edit" link for zero section */ /* var disable_zero_section = 0; function edit_zero_section { if(disable_zero_section != 1 && (document.getElementById('bodyContent').innerHTML.match('class=\"editsection\"'))) document.getElementById('bodyContent').innerHTML = "[edit] " + document.getElementById('bodyContent').innerHTML; } $(edit_zero_section);

// addPurge $(function {    var hist; var url;    if (!(hist = document.getElementById('ca-history') )) return;    if (!(url = hist.getElementsByTagName('a')[0] )) return;    if (!(url = url.href )) return;    mw.util.addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'), 'purge', 'ca-purge', 'Purge server cache for this page', 'p'); });

// From MediaWiki_talk:Linkshere

// Begin delete link code function addDeleteLink { var targetSpan = document.getElementById('specialDeleteTarget'); var linkSpan = document.getElementById('specialDeleteLink'); if (targetSpan == null || linkSpan == null) return;

var targetLink = targetSpan.getElementsByTagName("A")[0]; if (targetLink == null) return;

var targetTitle = targetLink.childNodes[0].data;

var deleteHref = "http://en.wikipedia.org/w/index.php?action=delete&title=" + escape(targetTitle);

var deleteSpan = null; with (easyDom) { deleteSpan = span({ "class": "plainlinks" }, " (", a({ "href": deleteHref, "class": "external text" }, "delete"), ")"); }

linkSpan.appendChild(deleteSpan); } $(addDeleteLink);

// End delete link code

document.write(' ');