Utilisateur:Sherbrooke/monobook.js
Un article de Wikipédia, l'encyclopédie libre.
Note : Après avoir publié la page, vous devrez forcer son rechargement pour voir les changements : Mozilla / Konqueror / Firefox : Shift-Ctrl-R, Internet Explorer / Opera : Ctrl-F5, Safari : Cmd-R.
/* [[Wikipédia:Historiques en couleur]] ***************************************/ document.write('<script type="text/javascript" src="' + 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:GôTô/objects.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); document.write('<script type="text/javascript" src="' + 'http://fr.wikipedia.org/w/index.php?title=Utilisateur:Dake/monobook.js/deluxehistory.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // la fonction insertAfter n'est à copier que si elle n'est pas encore présente dans le monobook.js function insertAfter(parent, node, referenceNode) { parent.insertBefore(node, referenceNode.nextSibling); } /* Ajouter hyperliens dans Boîte perso ************************************************************/ function addLoadEvent(func) { if (window.addEventListener) { window.addEventListener("load", func, false); } else if (window.attachEvent) { window.attachEvent("onload", func); } } /* * Undelete Select All *******************************/ function UndeleteSelectAll() { if (window.location.href.indexOf("Special:Undelete") > 0) { var title2 = document.getElementsByTagName("h2") if (title2.length <= 0) return var all = document.createElement("input") all.setAttribute("type", "checkbox") all.setAttribute("id", "checkAll") if (all.attachEvent) all.attachEvent("onclick", function () { selectAll(document.getElementById("checkAll").checked) }) else all.setAttribute("onclick", "javascript: selectAll(this.checked)") all.setAttribute("title", "Sélectionner/Désélectionner tous") title2[title2.length -1].appendChild(all) all.click() } } function selectAll(bool) { var inputs = document.getElementsByTagName("input") for (var cpt = 0 ; cpt < inputs.length ; cpt++) { if (inputs[cpt].type == "checkbox") inputs[cpt].checked = bool } } addLoadEvent(UndeleteSelectAll) obtenir("RevertDiff"); obtenir("BlocageDeluxe");