Utilisateur:Elemiah/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.
// Les catégories en haut de la page... (bug graphique parfois) /* function catsattop() { var cats = document.getElementById('catlinks'); var bc = document.getElementById('bodyContent'); bc.insertBefore(cats, bc.childNodes[0]); } addLoadEvent( catsattop ) ; */ //Bistro d'aujourd'hui function TodayDate() { m = new Array("janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"); today = new Date(); day = today.getDate(); year = today.getYear(); if (year < 2000) year = year + 1900; return (day + " " + m[today.getMonth()] + " " + year); } function getWeekNr() { var today = new Date(); Year = takeYear(today); Month = today.getMonth(); Day = today.getDate(); now = Date.UTC(Year,Month,Day+1,0,0,0); var Firstday = new Date(); Firstday.setYear(Year); Firstday.setMonth(0); Firstday.setDate(1); then = Date.UTC(Year,0,1,0,0,0); var Compensation = Firstday.getDay(); if (Compensation > 3) Compensation -= 4; else Compensation += 3; NumberOfWeek = Math.round((((now-then)/86400000)+Compensation)/7); return NumberOfWeek; } function takeYear(theDate) { x = theDate.getYear(); var y = x % 100; y += (y < 38) ? 2000 : 1900; return y; } function Semaine_courante() { today = new Date(); year = today.getYear(); if (year < 2000) year = year + 1900; return ("semaine " + getWeekNr() + " " + year ); } // Rajout de lien dans les onglets en haut de la page ! function addLoadEvent(func) { if (window.addEventListener) window.addEventListener("load", func, false); else if (window.attachEvent) window.attachEvent("onload", func); } // Rajout de lien dans le menu de gauche ! function Menu() { var tDate = TodayDate(); var tSemaine = Semaine_courante(); var a = document.getElementById("p-navigation"); if (a) { b = a.getElementsByTagName("ul"); if (b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li><span title="Le Bistrot du jour">' + '<a href="/wiki/Wikipédia:Le Bistro/'+ tDate +'">Le Bistro</a></span>' + " - " +'<span title="Le Bistrot trié par nb de modifs">' + '<a href="/wiki/Utilisateur:Escalabot/Liste_des_messages_du_bistro_tri%C3%A9s_par_nombre_de_modifications">(nb)</a></span>' + " - " +'<span title="Le Bistrot trié par date">' + '<a href="/wiki/Utilisateur:Escalabot/Liste_des_messages_du_bistro_tri%C3%A9s_par_date">(date)</a></span></li>' + '<li><span title="L’Oracle">' + '<a href="/wiki/Wikipédia:Oracle/'+ tSemaine +'">L’Oracle</a></span>' + " - " + '<span title="La Guilde des Guides">' + '<a href="/wiki/Wikipédia:Guilde_des_Guides">Guilde Guides</a></span></li>' + '<li><span title="Page courante PàS">' + '<a href="/wiki/Wikipédia:Pages_à_supprimer">PàSupr</a></span>' + " - " + '<span title="Page courante IàS">' + '<a href="/wiki/Wikipédia:Images_à_supprimer">Image à Supr</a></span></li>' + '<li><span title="Recherche Google">' + '<a href="http://www.google.fr/custom?sa=Google+Search&domains=fr.wikipedia.org;wikipedia.org&sitesearch=fr.wikipedia.org">Recherche Google</a></span></li>' } } var a = document.getElementById("p-Contribuer"); if (a) { b = a.getElementsByTagName("ul"); if (b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li><span title="L\'accueil communautaire">' + '<a href="/wiki/Wikipédia:Accueil">Communauté</a></span>' + " - " + '<span title="Aide.">' + '<a href="/wiki/Aide:Sommaire">Aide</a></span></li>' } } } addLoadEvent(Menu); // Ajout de boutons pour commenter les modifications courantes 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("+ ébauch") titles.push("+ cat") titles.push("+ img") titles.push("+ interw") titles.push("+ wlien") titles.push("- img") titles.push("- lien ext") titles.push("cor wlien") titles.push("omony") titles.push("MeP") titles.push("ortho/gram") titles.push("ref") titles.push("retouchs") titles.push("ajInfo") titles.push("guilmet") titles.push("T") var inputs = new Array() // <nowiki> inputs.push("+ {{ébauche}}") // </nowiki> inputs.push("+ catégorie") inputs.push("+ image") inputs.push("+ liens interwiki") inputs.push("+ wikification") inputs.push("- image manquante") inputs.push("- lien externe") inputs.push("+ correction lien interne") inputs.push("+ correction homonymie") inputs.push("+ mise en page") inputs.push("+ correction orthographe/grammaire") inputs.push("+ reformulation") inputs.push("+ retouches mineures") inputs.push("+ ajout d’infos") inputs.push("+ guillemets fr") inputs.push("+ correction typographique") 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); // Ajout dans la page de suivi de modification de contrôle pour sélectionner plus rapidement des pages var suiviManagerAllPages = new Array(); function SuiviManagerRegexp(regexp) { var match = new RegExp(regexp); for (var i=0;i<suiviManagerAllPages.length;i++) { var pageName = suiviManagerAllPages[i].childNodes[0].getAttribute("value"); if (match.test(pageName)) { suiviManagerAllPages[i].childNodes[0].checked=true; } } } function SuiviManagerLiensRouges() { for (var i=0;i<suiviManagerAllPages.length;i++) { var pageClass = suiviManagerAllPages[i].childNodes[1].getAttribute("class"); if (pageClass && pageClass=="new") { suiviManagerAllPages[i].childNodes[0].checked=true; } } } function SuiviManagerDeselect() { for (var i=0;i<suiviManagerAllPages.length;i++) { suiviManagerAllPages[i].childNodes[0].checked=false; } } function SuiviManager() { if (document.URL.indexOf("http://fr.wikipedia.org/wiki/Special:Watchlist/edit")!=0) return; var a=0; var b=0; var interfaceMsg = new Array(); var regexpList = new Array(); ////////////////////////////////////////////////// // Expressions régulières et liens de l'interface // // besoin d'aide pour les regexp ? // http://www.commentcamarche.net/javascript/jsregexp.php3 ////////////////////////////////////////////////// interfaceMsg[a++] = "<b>Tout cocher</b>"; regexpList[b++] = "^.*"; interfaceMsg[a++] = "Utilisateurs"; regexpList[b++] = "^Utilisateur:"; interfaceMsg[a++] = "Wikipédia:*"; regexpList[b++] = "^Wikipédia:"; interfaceMsg[a++] = "Sous-pages de PàS"; regexpList[b++] = "^Wikipédia:Pages à supprimer\/"; interfaceMsg[a++] = "Sous-pages de PàV"; regexpList[b++] = "^Wikipédia:Pages à vérifier\/"; interfaceMsg[a++] = "Pages du bistro"; regexpList[b++] = "^Wikipédia:Le Bistro\/"; interfaceMsg[a++] = "Images"; regexpList[b++] = "^Image:"; interfaceMsg[a++] = "Modèles"; regexpList[b++] = "^Modèle:"; interfaceMsg[a++] = "Aide"; regexpList[b++] = "^Aide:"; interfaceMsg[a++] = "Catégories"; regexpList[b++] = "^Catégorie:"; interfaceMsg[a++] = "Portails"; regexpList[b++] = "^Portail:"; ////////////////////////////////////////////////// var topTag = document.getElementById("contentSub") // récupère toutes les pages var watchlist = document.getElementsByTagName("ul"); for (u=0;u<watchlist.length;u++) { var entries = watchlist[u].getElementsByTagName("li"); for (i=0;i<entries.length;i++) { suiviManagerAllPages.push(entries[i]); } } // prépare la mini-interface var str = "<div style=\"background-color:#8ecfe4;font-size:1px;height:8px;border:1px solid #AAAAAA;-moz-border-radius-topright:0.5em;-moz-border-radius-topleft:0.5em;\"></div>" + "<div style=\"border:1px solid #6ac1de;border-top:0px solid white;padding:5px 5px 0 5px;margin-bottom:3ex;\"><p>" + "<div style=\"float: left; text-align: left; white-space: nowrap;\"></div>" for (var cpt = 0; cpt < interfaceMsg.length; cpt ++) { str += "<a href=\"javascript:SuiviManagerRegexp('" + regexpList[cpt] + "')\">" + interfaceMsg[cpt] + " ·</a> " } str += "<a href=\"javascript:SuiviManagerLiensRouges()\">" + "Retirer les liens rouges" + " ·</a> " str += "<a href=\"javascript:SuiviManagerDeselect()\">" + "<b>Enlever toutes les coches</b>" + " ·</a> " topTag.innerHTML = topTag.innerHTML + "<br clear=all />" + str + "<p></div>" } addLoadEvent(SuiviManager); // Auteur : Anakin // Dernière mise à jour : 11 décembre 2005 function CategoryTree() { var element = document.getElementById('ca-nstab-category'); if (element) { var categoryname = element.firstChild.href; categoryname = categoryname.substring(7); var wikiname = categoryname.substring(0, categoryname.indexOf('.')); var indexofname = categoryname.indexOf(":") + 1; categoryname = categoryname.substring(indexofname); var indexofampersand = categoryname.indexOf("&"); if (indexofampersand != -1) categoryname = categoryname.substring(0, indexofampersand); var li = document.createElement('li'); li.id = 'ca-categorytree'; var a = document.createElement('a'); a.appendChild(document.createTextNode("Arborescence")); a.href = 'http://tools.wikimedia.de/~daniel/WikiSense/CategoryTree.php?wikilang=fr&wiki=' + wikiname + '&art=on&cat=' + categoryname; li.appendChild(a); document.getElementById('ca-nstab-category').parentNode.appendChild(li); } } addLoadEvent(CategoryTree); // Auteur : Anakin // Dernière mise à jour : 11 décembre 2005 function ImageUse() { var element = document.getElementById('ca-nstab-image'); if (element) { var imagename = element.firstChild.href; var indexofname; if (imagename.indexOf("http://") != -1) indexofname = imagename.indexOf(":", 6); else indexofname = imagename.indexOf(":"); imagename = imagename.substring(indexofname + 1); var indexofampersand = imagename.indexOf("&"); if (indexofampersand != -1) imagename = imagename.substring(0, indexofampersand); var li = document.createElement('li'); li.id = 'ca-imageuse'; var a = document.createElement('a'); a.appendChild(document.createTextNode("Voir l'utilisation")); a.href = 'http://www.juelich.de/avatar/check-usage/check-usage.php?filename=' + imagename + '&template'; li.appendChild(a); document.getElementById('ca-nstab-image').parentNode.appendChild(li); } } addLoadEvent(ImageUse); /* Lien Editcount */ var tabAction = "p-cactions"; function addECButton() { if ( window.location.href.indexOf('Contributions') < 0) return; var c = document.getElementById('contentSub'); var a = c.getElementsByTagName('a'); name = a[0].innerHTML; var l = document.getElementById(tabAction); t = l.innerHTML; ind = t.toLowerCase().indexOf("</ul>"); before = t.substring(0,ind); after = t.substring(ind); pitem = "<li><a href='http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?user="+escape(name)+"&dbname=frwiki_p'>"+ "<div id='EditCount' style='display:inline;'>" + "Editcount" + "</div></a></li>"; l.innerHTML = before + pitem + after ; } addLoadEvent(addECButton); // This will add an [edit top] link at the top of all pages except preview pages // by User:Pile0nades // Add an [edit top] link to pages addOnloadHook(function () { // if this is preview page or generated page, stop if(document.getElementById("wikiPreview") || window.location.href.indexOf("/wiki/Special:") != -1) return; // get the page title var pageTitle = document.title.split(" - ")[0].replace(" ", "_"); // create div and set innerHTML to link //var divContainer = document.createElement("span"); //divContainer.innerHTML = '<span style="font-size: x-small; display: inline; font-weight: normal;" class="firstedit">[<a href="/w/index.php?title='+pageTitle+'&action=edit§ion=0" title="'+document.title.split(" - ")[0]+'">Modifier tête</a>]</span><br />'; // insert divContainer into the DOM after the h1 if(window.location.href.indexOf("&action=edit") == -1) { var jh = document.getElementById("content"); var ji = jh.getElementsByTagName("h1"); ji[0].innerHTML = ji[0].innerHTML + ' <span style="font-size: x-small; font-weight: normal;" class="firstedit">[<a href="/w/index.php?title='+pageTitle+'&action=edit§ion=0" title="'+document.title.split(" - ")[0]+'">Modifier tête</a>]</span>'; //document.getElementById("content").insertBefore(divContainer, (document.getElementsByTagName("h1")[0]).nextSibling); } if(window.location.href.indexOf("&action=edit§ion=0") != -1) document.getElementById("wpSummary").value = "/* Intro */ "; }); //Pour une boite de recherche amélioré Voir [[Utilisateur:Seb35]] document.write('<script type="text/javascript" src="http://fr.wikipedia.org/w/index.php?title=Utilisateur:Elemiah/advancedResearch.js&action=raw&ctype=text/javascript&dontcountme=s"></script>'); // Fonction pour rajouter un bouton a une toolbar de l'interface // voir : http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/addLink function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) { if(key && title) { ta[id] = [key, title]; } else if(key) { ta[id] = [key, '']; } else if(title) { ta[id] = ['', title]; } } // re-render the title and accesskeys from existing code in wikibits.js akeytt(); return li; } // Fonction pour rajouter un onglet // voir : http://en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_User_scripts/Scripts/Add_tab&action=edit function addTab(url, name, id, title, key){ var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0]; return addlilink(tabs, url, name, id, title, key) }; //Fonction de rajout d'un onglet derniere differences sur cet article et toutes les differences depuis ma derniere edition // addLastDiff // Voir : http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510 function addModifDiffOnglet() { //var l=addTab("http://fr.wikipedia.org/w/index.php?title=" + pname + "&diff=cur&oldid=prev", 'der', ''); //l.lastChild.title="Show most recent diff"; if (window.location.href.indexOf("&action=history&gotosince=true")!=-1) { do_since_I_last_edited() } else if (!/wiki\/Special:|w\/index.php?title=Special:/.test(window.location.href)) { var thetitle=document.title.slice(0, String(document.title).indexOf(" - ")); //var l=addlilink(tabs, "/w/index.php?title="+thetitle+"&action=history&gotosince=true", '/moi', ''); //l.lastChild.title="Changes since I last edited"; } var tabs = document.getElementById("p-cactions") if (tabs) { var tabs2 = tabs.getElementsByTagName("ul"); if(tabs2.length > 0) { tabs2[0].innerHTML = tabs2[0].innerHTML +'<li id="ca-modif"><font style="color: blue; padding-left: 0em"><a href="http://fr.wikipedia.org/w/index.php?title=' + thetitle + '&diff=cur&oldid=prev">' + 'diff</a></font>' + '<a href="http://fr.wikipedia.org/w/index.php?title=' + thetitle + '&action=history&gotosince=true">' + '/moi</a>' + '</li>'; } } }; function do_since_I_last_edited() { var csub=document.getElementById("contentSub"); var msg=document.createElement("p"); msg.appendChild(document.createTextNode ("Parsing history... please wait...")); msg.className="error"; csub.insertBefore(msg, csub.firstChild) var username=document.getElementById("pt-userpage").textContent; var hists=document.getElementById("pagehistory").getElementsByTagName('li'); for (n=0;n<hists.length;n++) { if (hists[n].getElementsByTagName("span")[0].getElementsByTagName('a')[0].textContent==username) { document.location=hists[n].childNodes[1].href; return; } } msg.replaceChild(document.createTextNode ("You have not edited this page! (recently)"), msg.firstChild); } addOnloadHook(addModifDiffOnglet); // Ajout d'onglet google (par Drake) function googleOnglet() { var a = document.getElementById("p-cactions"); if (a) { var pageName = document.title.replace(" - Wikipédia", ""); b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li id="ca-recherche"><font style="color: blue; font-weight: bold; padding-left: 0em"><a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=' + pageName + '&btnG=Search">G</a></font>' + '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Afr.wikipedia.org+' + pageName + '&btnG=Search">' + 'wp-fr</a>' + '<a href="http://www.google.fr/search?num=20&hl=en&safe=off&q=site%3Awikipedia.org+' + pageName + '&btnG=Search">' + 'wp</a>' + '</li>'; } } } //Rajoute sur une page utilisateur plusieurs onglets : edit count, page déplacé, contribs, et block logs // voir : http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/User_tabs function addOnglets() { if (document.title.indexOf("Utilisateur:") == 0 || document.title.indexOf("Discussion Utilisateur:") == 0) { if (document.title.search("/") != -1 || document.title.search("- History -") != -1) { //no subpages or history return; } username_a = document.URL.match(/:.*:(.*)/); username=username_a[1]; var a = document.getElementById("p-cactions"); if (a) { b = a.getElementsByTagName("ul"); if(b.length > 0) { b[0].innerHTML = b[0].innerHTML + '<li id="ca-user-info"><font style="color: blue; font-weight: bold; padding-left: 0em"><a href="http://fr.wikipedia.org/wiki/Special:Contributions/' + username + '">contrib</a></font>' + '<a href="http://fr.wikipedia.org/w/index.php?title=Special%3ALog&type=move&user=' + username + '">' + 'movs</a>' + '<a href="http://fr.wikipedia.org/w/index.php?title=Special%3ALog&type=block&user=' + username + '">' + 'logs</a>' + '<a href="http://tools.wikimedia.de/~interiot/cgi-bin/count_edits?dbname=frwiki_p&user=' + username + '">' + 'editC</a>' + '</li>'; } } } else { googleOnglet(); } }; addOnloadHook(addOnglets); // adds a 'logs for this page' link to the navigation bar // if the page is a user's page, talk page or subpage, the link will go to logs for the user instead // if the page is a special page, then no link is displayed // voir : http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Logs_link function addLogsLink() { // get page title var pagetitleRe=/[^:]*:\/\/fr\.wikipedia\.org\/(wiki\/|w\/index\.php\?title=)([^&?#]*)/; ptitle = pagetitleRe.exec(decodeURI(location.href))[2].split('_').join(' '); // if this is a user, show the logs for the user rather than the page if( (window.location.href.indexOf("Utilisateur:") != -1) || (window.location.href.indexOf("Discussion_Utilisateur:") != -1) ) { regDropSubpages = /[User|User_talk]:([^&?\/]*)[\/]?.*/; user = regDropSubpages.exec(ptitle)[1]; url = "http://fr.wikipedia.org/w/index.php?title=Special%3ALog&user=" + user; } else if(window.location.href.indexOf("Special:") != -1) { // don't display link for special pages return; } else { url = "http://fr.wikipedia.org/w/index.php?title=Special%3ALog&page=" + ptitle; } tabsE = document.getElementById("p-tb").getElementsByTagName('ul')[0]; l = addlilink(tabsE, url, "Logs", "pt-logs"); }; if (window.addEventListener) window.addEventListener("load", addLogsLink, false); else if (window.attachEvent) window.attachEvent("onload", addLogsLink); //LiveRC (voir : http://fr.wikipedia.org/wiki/Utilisateur:EDUCA33E/LiveRC/Documentation) loadJs('Utilisateur:EDUCA33E/LiveRC.js'); // Revert tools by Lorian //Voir : http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Revert_tools function getElementsByClass(searchClass,node,tag) { // Function from http://www.dustindiaz.com/getelementsbyclass/ var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); for (i = 0, j = 0; i < elsLen; i++) { if ( pattern.test(els[i].className) ) { classElements[j] = els[i]; j++; } } return classElements; } // _GET code from NoGray JS Library http://www.nogray.com/new_site/ var _GET = new Array(); var _uri = location.href; var _temp_get_arr = _uri.substring(_uri.indexOf('?')+1, _uri.length).split("&"); var _temp_get_arr_1 = new Array(); for(_get_arr_i=0; _get_arr_i<_temp_get_arr.length; _get_arr_i++){ _temp_get_arr_1 = _temp_get_arr[_get_arr_i].split("="); _GET[decodeURI(_temp_get_arr_1[0])] = decodeURI(_temp_get_arr_1[1]); } delete _uri; delete _temp_get_arr; delete _temp_get_arr_1; function getMessage (where, user1, user2) { var message = prompt ('Quel est le message à laisser au vandale ?', ''); window.location = 'http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message; } addOnloadHook(function (){ if (location.href.match(/diff=/)) { // Get username of submitter var user1 = getElementsByClass('diff-otitle',null,'td'); user1 = user1[0].getElementsByTagName('a')[2].innerHTML; var user2 = getElementsByClass('diff-ntitle',null,'td'); user2 = user2[0].getElementsByTagName('a')[2].innerHTML; document.getElementById('contentSub').innerHTML = '(<a href="http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&revert=1&user1='+user1+'&user2='+user2+'">Révocation</a> / <a href="javascript:var message = getMessage(\'revert\', \''+user1+'\', \''+user2+'\');">Commentaire</a>) (<a href="http://fr.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&vandalism=1&user1='+user1+'&user2='+user2+'">Vandalisme</a> / <a href="javascript:var message = getMessage(\'vandalism\', \''+user1+'\', \''+user2+'\');">Commentaire</a>) (Avertissement : <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=1">Test</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=2">Non constructif</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=3">Vandalisme</a> / <a href="http://fr.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=4">Aggravé</a>)'; } else if (location.href.match(/revert=1/)) { document.getElementById('wpSummary').value = 'Révocation des modifications de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] (retour à la version ' + _GET['oldid']+' de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']])'; document.getElementById('editform').submit(); } else if (location.href.match(/revert=2/)) { document.getElementById('wpSummary').value = 'Rév. de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] : '+_GET['message']; document.getElementById('editform').submit(); } else if (location.href.match(/vandalism=1/)) { document.getElementById('wpSummary').value = 'Révocation du vandalisme de [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] (retour à la version ' + _GET['oldid']+' de [[Special:Contributions/'+_GET['user1']+'|'+_GET['user1']+']])'; document.getElementById('editform').submit(); } else if (location.href.match(/vandalism=2/)) { document.getElementById('wpSummary').value = 'Rév. vandale : [[Special:Contributions/'+_GET['user2']+'|'+_GET['user2']+']] : '+_GET['message']; document.getElementById('editform').submit(); } else if (location.href.match(/warn=1/)) { document.getElementById('wpSummary').value = 'Avertissement de légère détérioration'; document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 0}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=2/)) { document.getElementById('wpSummary').value = 'Avertissement de vandalisme'; document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 1}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=3/)) { document.getElementById('wpSummary').value = 'Avertissement de vandalisme aggravé'; document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 2}} ~~'+'~~'; document.getElementById('editform').submit(); } else if (location.href.match(/warn=4/)) { document.getElementById('wpSummary').value = 'Dernier avertissement'; document.getElementById('wpTextbox1').value = '{{sub'+'st:Test 3}} ~~'+'~~'; document.getElementById('editform').submit(); } });