MediaWiki:Monobook.js
Appearance
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// <pre><nowiki>
/* tooltips and access keys */
/* Any JavaScript here will be loaded for users using the MonoBook skin */
/*
* moveEditsection
* This script moves the section edit links from the right edge of the page
* to the right edge of the heading. (Imported from German Wikipedia)
*
* This functionality can be disabled by adding the following line without the
* asteriks to your custom monobook.js (located under [[User:Username/monobook.js]]):
* var oldEditsectionLinks = true;
*/
function moveEditsection() {
if (typeof oldEditsectionLinks == 'undefined' || oldEditsectionLinks == false) {
var spans = document.getElementsByTagName("span");
for (var i = 0; i < spans.length; i++) {
if (spans[i].className == "editsection") {
spans[i].style.fontSize = "x-small";
spans[i].style.fontWeight = "normal";
spans[i].style.cssFloat = "none";
spans[i].style.marginLeft = "0px";
spans[i].parentNode.appendChild(document.createTextNode(" "));
spans[i].parentNode.appendChild(spans[i]);
}
}
}
} // onload
addOnloadHook(moveEditsection);
// END Moving of the editsection links
// ============================================================
// ============================================================
// </nowiki></pre>