Utilisateur:Captainm/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.
loadJs('User:EDUCA33E/LiveRC.js'); /*loadJs('Utilisateur:Maloq/RC.js');*/ /*************************** *Bouton « Revert » ***************************/ obtenir("RevertDiff"); ////////////////////////////////////////////////////////////////////////////////////////// // Recherche avancée ////////////////////////////////////////////////////////////////////////////////////////// obtenir('AdvancedResearch'); adSearchSametab = true; ////////////////////////////////////////////////////////////////////////////////////////// // Détection de plagiats ////////////////////////////////////////////////////////////////////////////////////////// obtenir("CopyScape"); ////////////////////////////////////////////////////////////////////////////////////////// //Ajout d'une comparaison des heures de contributions de plusieurs utilisateurs ////////////////////////////////////////////////////////////////////////////////////////// obtenir("FusionContribs"); /*************************** *Modifications courantes dans la boite de résumé ***************************/ <!--AJOUT DE BOUTONS POUR COMMENTER LES MODIFICATIONS COURANTES LORS D'UNE MODIFICATION--> function addToSummary(str) { document.editform.wpSummary.value += " " + str } function DeluxeSummary() { var sumLbl = document.getElementById("wpSummaryLabel") if (sumLbl) { //élargissement boite de résumé var sumInput = document.getElementById("wpSummary") sumInput.style.width = "90%" var titles = new Array() titles.push("style") titles.push("typo") titles.push("ortho") titles.push("ajout infos") titles.push("image") titles.push("wikification") titles.push("mise en page") titles.push("ébauche") titles.push("intro") titles.push("article connexe") titles.push("lien externe") titles.push("référence") titles.push("portail") titles.push("cat") titles.push("interwiki") var inputs = new Array() inputs.push("style") inputs.push("typo") inputs.push("ortho") inputs.push("ajout d’infos") inputs.push("image") inputs.push("wikification") inputs.push("mise en page") inputs.push("{{ébauche}}") inputs.push("intro") inputs.push("article connexe") inputs.push("lien externe") inputs.push("référence") inputs.push("portail") inputs.push("catégorie") inputs.push("interwiki") var str = "" for (var cpt = 0; cpt < titles.length; cpt ++) { str += "<a href=\"javascript:addToSummary('" + inputs[cpt] + "')\"" + " class=\"sumLink\" title=\"Ajouter '" + inputs[cpt] +"' dans la boîte de résumé\">" + titles[cpt] + " ·</a> " } sumLbl.innerHTML = str + "<br />" + sumLbl.innerHTML } } addLoadEvent(DeluxeSummary) /* * Onglet Google * * Rajoute un onglet vers Google portant sur le titre de la page * * Auteur : Dake, Hégésippe * Dernière révision : 22 novembre 2007 * [[Catégorie:MediaWiki:Fonction Monobook en JavaScript]] */ function OngletGoogle() { var a = document.getElementById("p-cactions"); if (a && wgNamespaceNumber >= 0) { b = a.getElementsByTagName("ul"); if (b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li id="ca-nstab-user"><img src="http://www.google.com/intl/en/logos/Logo_60wht.gif" height="20px">' + '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Afr.wikipedia.org+' + wgPageName + '&btnG=Search">' + '(fr)</a>' + '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=' + wgPageName + '&btnG=Search">' + '(web)</a>' + '</li>'; } } } addOnloadHook(OngletGoogle);