Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;

Firefox (sur GNU/Linux) / Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
 function disambiguationHook () {
   var toto = document.title;
   if (toto.match(/^Modification/) && !toto.match(/monobook.js/)) {
     // correctLabel("  ", " ");
     // correctLabel(" en sport|", " en rugby à XV|");
     correctLabel("Stade Toulousain", "Stade toulousain");
     correctLabel("Aviron Bayonnais", "Aviron bayonnais");
     correctLabel("Biarritz Olympique", "Biarritz olympique");
     correctLabel("Stade Français", "Stade français");
     correctLabel("Stade Francais", "Stade français");
     correctLabel("Stade francais", "Stade français");
     correctLabel("Castres Olympique", "Castres olympique");
     correctLabel("Rugby Club Toulonnais", "Rugby club toulonnais");
     correctLabel("Racing Club Narbonnais", "Racing club narbonnais");
     correctLabel("Top14", "Top 14");
     correctLabel("TOP 14", "Top 14");
     correctLabel("Section Paloise", "Section paloise");
     correctLabel("Stade Montois", "Stade montois");
     correctLabel("Stadoceste Tarbais", "Stadoceste tarbais");
     correctLabel("Racing Club de France", "Racing club de France");
     correctLabel("Racing métro", "Racing Métro");
     correctLabel("Racing metro", "Racing Métro");
     correctLabel("Racing Metro", "Racing Métro");
     disambiguationLinkHook("Fédérale 3", "Championnat de France de 3e division fédérale");
     disambiguationLinkHook("Fédérale 2", "Championnat de France de 2e division fédérale");
     disambiguationLinkHook("Championnat de France de 1ère division fédérale", "Championnat de France de 1re division fédérale");
     disambiguationLinkHook("Championnat de france de 1re division fédérale", "Championnat de France de 1re division fédérale");
     disambiguationLinkHook("Championnat de France de 1re division federale", "Championnat de France de 1re division fédérale");
     disambiguationLinkHook("Fédérale 1", "Championnat de France de 1re division fédérale");
     disambiguationLinkHook("Pro D2", "Championnat de France de rugby Pro D2");
     disambiguationLinkHook("Top 14", "Championnat de France de rugby à XV");
     disambiguationLinkHook("Championnat de France de rugby", "Championnat de France de rugby à XV");
     disambiguationLinkHook("Championnat de France de rugby a XV", "Championnat de France de rugby à XV");
     disambiguationLinkHook("USAP", "Union sportive arlequins perpignanais");
     disambiguationLinkHook("USA Perpignan", "Union sportive arlequins perpignanais");
     disambiguationLinkHook("Union Sportive Arlequins Perpignanais", "Union sportive arlequins perpignanais");
     disambiguationLinkHook("FC Lourdes", "Football club lourdais Hautes-Pyrénées");
     disambiguationLinkHook("SU Agen", "Sporting union Agen Lot-et-Garonne");
     disambiguationLinkHook("ASM Clermont", "ASM Clermont Auvergne");
     disambiguationLinkHook("FC Auch", "Football club Auch Gers");
     disambiguationLinkHook("Football Club Auch Gers", "Football club Auch Gers");
     disambiguationLinkHook("FC Auch Gers", "Football club Auch Gers");
     disambiguationLinkHook("Aviron bayonnais", "Aviron bayonnais rugby pro");
     disambiguationLinkHook("Aviron bayonnais (rugby)", "Aviron bayonnais rugby pro");
     disambiguationLinkHook("Aviron bayonnais Rugby Rro", "Aviron bayonnais rugby pro");
     disambiguationLinkHook("Biarritz olympique", "Biarritz olympique Pays basque");
     disambiguationLinkHook("Biarritz olympique Pays Basque", "Biarritz olympique Pays basque");
     disambiguationLinkHook("Stade français", "Stade français Paris rugby");
     disambiguationLinkHook("Stade français Paris", "Stade français Paris rugby");
     disambiguationLinkHook("Stade Francais Paris", "Stade français Paris rugby");
     disambiguationLinkHook("Stade Français Paris", "Stade français Paris rugby");
     disambiguationLinkHook("Stade français Paris Rugby", "Stade français Paris rugby");
     disambiguationLinkHook("Stade français CASG Paris", "Stade français Paris rugby");
     disambiguationLinkHook("RC Toulon", "Rugby club toulonnais");
     disambiguationLinkHook("Coupe d'Europe de rugby", "Coupe d'Europe de rugby à XV");
     disambiguationLinkHook("H Cup", "Coupe d'Europe de rugby à XV");
     disambiguationLinkHook("Stade Toulousain", "Stade toulousain");
     disambiguationLinkHook("Castres Olympique", "Castres olympique");
     disambiguationLinkHook("All Blacks", "Équipe de Nouvelle-Zélande de rugby à XV");
     disambiguationLinkHook("All Black", "Équipe de Nouvelle-Zélande de rugby à XV");
     disambiguationLinkHook("Wallabies", "Équipe d'Australie de rugby à XV");
     disambiguationLinkHook("Springboks", "Équipe d'Afrique du Sud de rugby à XV");
     disambiguationLinkHook("CA Brive", "Club athlétique Brive Corrèze Limousin");
     disambiguationLinkHook("XV de France", "Équipe de France de rugby à XV");
     disambiguationLinkHook("Super 12", "Super 14");
     disambiguationLinkHook("Stade Aurillacois", "Stade aurillacois Cantal Auvergne");
     disambiguationLinkHook("Stade aurillacois", "Stade aurillacois Cantal Auvergne");
     disambiguationLinkHook("Stade Aurillacois Cantal Auvergne", "Stade aurillacois Cantal Auvergne");
     disambiguationLinkHook("Tri-Nations", "Tri-nations");
     disambiguationLinkHook("Tri-nation", "Tri-nations");
     disambiguationLinkHook("LNR", "Ligue nationale de rugby");
     disambiguationLinkHook("US Montauban", "Union sportive montalbanaise");
     disambiguationLinkHook("Union Sportive Montalbanaise", "Union sportive montalbanaise");
     disambiguationLinkHook("MTG XV", "Union sportive montalbanaise");
     disambiguationLinkHook("US Colomiers", "Union sportive Colomiers rugby");
     disambiguationLinkHook("CSBJ", "Club sportif Bourgoin-Jallieu rugby");
     disambiguationLinkHook("CS Bourgoin-Jallieu", "Club sportif Bourgoin-Jallieu rugby");
     disambiguationLinkHook("Section Paloise", "Section paloise");
     disambiguationLinkHook("Oyonnax Rugby", "Union sportive Oyonnax rugby");
     disambiguationLinkHook("Oyonnax rugby", "Union sportive Oyonnax rugby");
     disambiguationLinkHook("US Oyonnax", "Union sportive Oyonnax rugby");
     disambiguationLinkHook("US Oyonnax rugby", "Union sportive Oyonnax rugby");
     disambiguationLinkHook("RC Narbonne", "Racing club de Narbonne Méditerranée");
     disambiguationLinkHook("RCNM", "Racing club de Narbonne Méditerranée");
     disambiguationLinkHook("Racing Club de Narbonne Méditerranée", "Racing club de Narbonne Méditerranée");
     disambiguationLinkHook("Racing Club Narbonnais", "Racing club de Narbonne Méditerranée");
     disambiguationLinkHook("Racing club narbonnais", "Racing club de Narbonne Méditerranée");
     disambiguationLinkHook("Stade montois", "Stade montois (rugby)");
     disambiguationLinkHook("SC Albi", "Sporting club albigeois");
     disambiguationLinkHook("Sporting Club Albigeois", "Sporting club albigeois");
     disambiguationLinkHook("Montpellier HRC", "Montpellier Hérault rugby");
     disambiguationLinkHook("Montpellier HR", "Montpellier Hérault rugby");
     disambiguationLinkHook("MHRC", "Montpellier Hérault rugby");
     disambiguationLinkHook("Racing Club de France (rugby)", "Racing Métro 92");
     disambiguationLinkHook("Metro-Racing", "Racing Métro 92");
     disambiguationLinkHook("Racing Club de France (Rugby)", "Racing Métro 92");
     disambiguationLinkHook("Racing metro 92", "Racing Métro 92");
     disambiguationLinkHook("Racing métro 92", "Racing Métro 92");
     disambiguationLinkHook("Racing-Metro 92", "Racing Métro 92");
     disambiguationLinkHook("Marseille Vitrolles Rugby", "Marseille Vitrolles rugby");
     disambiguationLinkHook("Marseille Provence XV", "Marseille Vitrolles rugby");
     disambiguationLinkHook("Lyon OU", "Lyon olympique universitaire");
     disambiguationLinkHook("LOU Rugby", "Lyon olympique universitaire");
     disambiguationLinkHook("FC Grenoble", "Football club de Grenoble rugby");
     disambiguationLinkHook("FC Grenoble Rugby", "Football club de Grenoble rugby");
     disambiguationLinkHook("Stadoceste Tarbais", "Tarbes Pyrénées rugby");
     disambiguationLinkHook("Tarbes Pyrénées Rugby", "Tarbes Pyrénées rugby");
     disambiguationLinkHook("Tarbes Pyrénées", "Tarbes Pyrénées rugby");
     disambiguationLinkHook("Stadoceste tarbais", "Tarbes Pyrénées rugby");
     disambiguationLinkHook("Racing Club de Paris", "Racing club de France");
     disambiguationLinkHook("Racing Club de France", "Racing club de France");
     disambiguationLinkHook("Racing club de france", "Racing club de France");
     disambiguationLinkHook("Racing Club De France", "Racing club de France");
     disambiguationLinkHook("ASBH", "Association sportive de Béziers Hérault");
     disambiguationLinkHook("Association sportive Béziers Hérault", "Association sportive de Béziers Hérault");
     disambiguationLinkHook("Association Sportive Biterroise", "Association sportive de Béziers Hérault");
     disambiguationLinkHook("AS Béziers Hérault", "Association sportive de Béziers Hérault");
     disambiguationLinkHook("Association Sportive de Béziers Hérault", "Association sportive de Béziers Hérault");
     disambiguationLinkHook("US Dax", "Union sportive dacquoise");
     disambiguationLinkHook("Union Sportive Dacquoise", "Union sportive dacquoise");
     disambiguationLinkHook("Football Club Oloronais", "Football club oloronais");
     disambiguationLinkHook("FC Oloron", "Football club oloronais");
     disambiguationLinkHook("Union Sportive Carcassonnaise", "Union sportive carcassonnaise XV");
     disambiguationLinkHook("Union sportive carcassonnaise", "Union sportive carcassonnaise XV");
     disambiguationLinkHook("US Carcassonne", "Union sportive carcassonnaise XV");
     disambiguationLinkHook("CASE Loire sud rugby", "Club athlétique de Saint-Étienne Loire sud rugby");
     disambiguationLinkHook("CASE Loire Sud Rugby", "Club athlétique de Saint-Étienne Loire sud rugby");
     disambiguationLinkHook("Atlantique Stade Rochelais", "Atlantique stade rochelais");
     disambiguationLinkHook("Stade rochelais", "Atlantique stade rochelais");
     disambiguationLinkHook("Bordeaux-Bègles", "Union Bordeaux Bègles");
     disambiguationLinkHook("Union Bordeaux-Bègles", "Union Bordeaux Bègles");
     disambiguationLinkHook("Pays d'Aix Rugby Club", "Pays d'Aix rugby club");
     disambiguationLinkHook("Pays d'Aix RC", "Pays d'Aix rugby club");
     disambiguationLinkHook("USFSA", "Union des sociétés françaises de sports athlétiques");
     disambiguationLinkHook("Union des Sociétés Françaises de Sports Athlétiques", "Union des sociétés françaises de sports athlétiques");
   }
 }
 
 function disambiguationLinkHook(old_text, new_text) {
   disambiguationLinkCase(old_text, new_text);
 
   old_text = old_text.charAt(0).toLowerCase() + old_text.substring(1, old_text.length);
   new_text = new_text.charAt(0).toLowerCase() + new_text.substring(1, new_text.length);
   disambiguationLinkCase(old_text, new_text);
 }
 
 function disambiguationModelHook(old_text, new_text) {
   disambiguationModelCase(old_text, new_text);
 
   old_text = old_text.charAt(0).toLowerCase() + old_text.substring(1, old_text.length);
   new_text = new_text.charAt(0).toLowerCase() + new_text.substring(1, new_text.length);
   disambiguationModelCase(old_text, new_text);
 }

 function disambiguationLinkCase(old_text, new_text) {
   var textToSearch = "["+old_text+"]";
   var textToUse = "[" + new_text + "|" + old_text + "]";
   // var textToUse = "[" + new_text +"]";
   
   // var comment = "Correction des [[Wikipédia:Projet/Liens vers les pages d'homonymie|liens vers les pages d'homonymie]] ("+new_text+")";
   var comment = "Correction du lien "+old_text+" -> "+new_text;
 
   doDisambiguation (textToSearch, textToUse, comment);
  
   textToSearch = "["+old_text+"|";
   textToUse = "[" + new_text +"|";
   doDisambiguation (textToSearch, textToUse, comment);
 
   textToSearch = "[" + new_text + "|" + new_text + "]";
   textToUse = "[" + new_text + "]";
   doDisambiguation (textToSearch, textToUse, comment);
 
   textToSearch = "["+old_text+"#";
   textToUse = "[" + new_text +"#";
   doDisambiguation (textToSearch, textToUse, comment);
 }

 function disambiguationModelCase(old_text, new_text) {
   var textToSearch = "{"+old_text+"}";
   var textToUse = "{" + new_text +"}";
   
   var comment = "Correction du modèle "+old_text+" -> "+new_text;
 
   doDisambiguation (textToSearch, textToUse, comment);
  
   textToSearch = "{"+old_text+"|";
   textToUse = "{" + new_text +"|";
   doDisambiguation (textToSearch, textToUse, comment);
 }

 function correctLabel(old_text, new_text) {
   var textToSearch = old_text;
   var textToUse = new_text;
 
   var comment = "Correction du libellé "+old_text+" -> "+new_text;
   doDisambiguation (textToSearch, textToUse, comment);
 }

 function doDisambiguation (textToSearch, textToUse, comment) {
   var text = document.getElementById("wpTextbox1");
   var index = 0;
   remplace = false;
   while (true) {
     var position = text.value.indexOf(textToSearch,position);
     if (position == -1)
       break;
     var beginLine = text.value.lastIndexOf("\n",position);
     var endLine   =   text.value.indexOf("\n",position);
     if ( window.confirm("Remplacer " + textToSearch + " -> " + textToUse + " dans :\n\n"+text.value.substring(beginLine,endLine))) {
       var aremplacer = (text.value.substring(0,position)+ textToUse + text.value.substring(position+textToSearch.length)); 
       text.value = aremplacer;
       remplace = true;
     }
     position +=1;
   }
   if (remplace) {
     document.getElementById("wpSummary").value = comment;
     document.getElementById("wpMinoredit").checked=true;
   }
 }

 // la ligne suivante à commenter pour desactiver le hook
 // $(disambiguationHook);