MediaWiki:Common.js/Edit section.js

/** Shifting the edit section links, adding link to the contents addOnloadHook(function { var sContents = "contents"; var hasToc = $("#toc").length > 0;
 * The function looks for, and moves them
 * to the end of their parent. Adds link to the contents of the page.
 * Thanks to Borislav Manolov, again and again :)

$("span.editsection") .css({"float" : "none"}) .each( function{ if (hasToc) { $(this).append(' ['+ sContents +']') } $(this).parent.append(this); } ); });