MediaWiki:Monobook.js
Aus Kitakien
(Unterschied zwischen Versionen)
(jetz in Common.js) |
K (verschoben nach MediaWiki:Common.js, damit es auch fuer alle anderen Skins wirkt) |
||
Zeile 1: | Zeile 1: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
//================================================================================ | //================================================================================ |
Version vom 08:43, 20. Mär. 2008
//================================================================================ //*** moveEditsection: Moving of the editsection links /* * moveEditsection * Dieses Script verschiebt die [Bearbeiten]-Buttons vom rechten Fensterrand * direkt rechts neben die jeweiligen Überschriften. * This script moves the [edit]-buttons from the right border of the window * directly right next to the corresponding headings. * * Zum Abschalten die folgende Zeile (ohne führendes Sternchen) in die eigene * monobook.js (zu finden unter [[Special:Mypage/monobook.js|Benutzer:Name/monobook.js]]) kopieren: * var oldEditsectionLinks = true; * * dbenzhuser (de:Benutzer:Dbenzhuser) */ addOnloadHook(function() { if (typeof oldEditsectionLinks != 'undefined' && oldEditsectionLinks) return; var spans = document.getElementsByTagName("span"); for (var i=0; i<spans.length; i++) { var span = spans[i]; if (span.className != "editsection") continue; span.style.fontSize = "x-small"; span.style.fontWeight = "normal"; span.style.cssFloat = "none"; span.style.marginLeft = "0px"; span.parentNode.appendChild(document.createTextNode(" ")); span.parentNode.appendChild(span); } }); //================================================================================ //*** import Onlyifediting-functions // SEE ALSO [[MediaWiki:Onlyifediting.js]] if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0) { document.write('<script type="text/javascript" src="/w/index.php?title=MediaWiki:Onlyifediting.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); } //================================================================================ //*** pageview counter // SEE ALSO [[MediaWiki:Pagecounter.js]] // Please talk to User:LeonWeber before changing anything or // if there are any issues with this. // disable the counter var disable_counter = 0; document.write('<script type="text/javascript" src="/w/index.php?title=MediaWiki:Pagecounter.js&action=raw&ctype=text/javascript&dontcountme=s&smaxage=3600"></script>'); //================================================================================ //*** Add button 'Inverse selection' on [[Special:Undelete]] /** Fügt das Bookmarklet zum Markieren aller Versionen auf Special:Undelete ein */ addOnloadHook(function() { var form = document.forms["undelete"]; if (!form) return; var elements = form.elements; var resetBtn = elements["mw-undelete-reset"]; if (!resetBtn) return; var toggleBtn = document.createElement("input"); toggleBtn.type = "button"; toggleBtn.value ="Auswahl umkehren"; toggleBtn.onclick = function() { for (var i=0; i<elements.length; i++) { var input = elements[i]; if (input.type != "checkbox") continue; input.checked = !input.checked; } } resetBtn.parentNode.insertBefore(toggleBtn, resetBtn); });