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) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
mw.loader.using(['mediawiki.util', 'ext.gadget.getStrDateToday'], function () {

////
// convertit '===' en '=='
////
// define  custom buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters)
var wikEdButton = {};
wikEdButton[100] = ['wikEdDiv', 'wikEdButton', '=== en ==', '//upload.wikimedia.org/wikipedia/commons/6/67/WikEd_logo.png', '16', '16', 'DIV', 'javascript:WikEdEditButton(this, this.id, null, TestHandler);' ];
wikEdButton[101] = ['wikEdTest', 'wikEdButton', 'This is a test button', '//upload.wikimedia.org/wikipedia/commons/0/07/WikEd_disabled.png', '16', '16', 'Test', 'javascript:WikEdEditButton(this, this.id, null, TestHandler);' ];

// define custom button bars (id outer, class outer, id inner, class inner, height, grip title, button numbers)
var wikEdButtonBar = {};
wikEdButtonBar['custom1'] = ['wikEdButtonBarCustom1',  'wikEdButtonBarCustom1',  'wikEdButtonsCustom1',  'wikEdButtonsCustom1',  44, 'My custom buttons', [100, 'br', 101] ];

// define the function which is called upon clicking the custom button
// this example code adds or removes div tags around the selected text

function TestHandler(obj) {

// select the appropriate text change target (whole, selection, cursor, focusWord, focusLine, selectionWord, or selectionLine)
//   focus... is the text under the cursor; ...Word and ...Line extend the target to the start/end of the word or line
WikEdGetText(obj, 'whole');
obj.changed = obj.whole;

// make the changes to the plain target text
obj.changed.plain = obj.changed.plain.replace(/===(.*?)===/g, '==$1==');

return;
}

/////////////////////////////////////////////////////////////////////////////////////
// Installe wikEd pour l'édition des pages (pour tous)
// Traduction de [[Utilisateur:Leag|Leag]] : [[Utilisateur:Leag/wikEd|wikEd]]

// installe la traduction française pour [[Utilisateur:Leag/wikEd|wikEd]]
document.write('<script type="text/javascript" src="'
+ '//en.wikipedia.org/w/index.php?title=User:Leag/wikEd-fr.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// install [[:en:User:Cacycle/diff]] text diff code
document.write('<script type="text/javascript" src="'
+ '//en.wikipedia.org/w/index.php?title=User:Cacycle/diff.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// install [[:en:User:Pilaf/Live_Preview]] page preview tool
document.write('<script type="text/javascript" src="'
+ '//en.wikipedia.org/w/index.php?title=User:Pilaf/livepreview.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// install [[:en:User:Cacycle/wikEd]] editing page extension
document.write('<script type="text/javascript" src="'
+ '//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/**
* Bistro du jour
*
* Lien vers le bistro du jour dans le panneau de navigation
*
* Auteur : ??
* Contributeur : Tieno, Maloq
* Dernière révision : 2 septembre 2008
* {{Catégorisation JS}}
*/
 
function TodayDate() {
var m = ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"];
var today = new Date();
var day = today.getDate();
var year = today.getYear();
 
if (year < 2000)
year = year + 1900;
 
return (day + " " + m[today.getMonth()] + " " + year);
}
 
function BistroDuJour()
{
mw.util.addPortletLink('p-navigation', '/wiki/Wikipédia:Le_Bistro/' + TodayDate().replace(new RegExp(' ','g'),'_'), 'Bistro du jour', 'n-bistro');
}
$(BistroDuJour);

//homonyme
importScript('Utilisateur:Spooky/JSScripts/Navigation popups');
popupFixDabs = true;



/************************************
** modèle : périodique, ouvrage
***************************************/
var ModèleJournal = "<ref>{{article\n"
+  "| langue=\n"
+  "| prénom1=\n"
+  "| nom1=\n"
+  "| lien auteur1=\n"
+  "| titre=\n"
+  "| périodique =\n"
+  "| lien périodique =\n"
+  "| jour=\n"
+  "| mois=\n"
+  "| année=\n"
+  "| volume=\n"
+  "| numéro=\n"
+  "| pages=\n"
+  "| issn=\n"
+  "| url texte=\n"
+  "| consulté le=" + getStrDateToday("j m a") + "\n"
+  "}}</ref>";
addCustomButton('//upload.wikimedia.org/wikipedia/commons/b/b4/Button_lienjournal.png','Journal',ModèleJournal,'','','mw-editbutton-journal');

var ModèleOuvrage = '<ref>{{Ouvrage\n'
+  '|titre=\n'
+  '|éditeur=\n'
+  '|auteur=\n'
+  '|langue=\n'
+  '|année=\n'
+  '|isbn=\n'
+  '|commentaire=\n'
+  '}}</ref>';
addCustomButton('//upload.wikimedia.org/wikipedia/commons/4/4b/Books-aj.svg_aj_ashton_01.svg','Ouvrage',ModèleOuvrage,'','','mw-editbutton-Ouvrage');


////////////////////////////////////////////////////////////////////////////////////////////////
// Résumé Projet:Correction syntaxique
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("Programmation modèles")
titles.push("Modèle")
titles.push("Titre de section")
titles.push("Balise small")
titles.push("Balise HTML")
titles.push("Catégorie")
titles.push("Lien interne")
titles.push("Lien externe")
titles.push("Lien interwiki")
titles.push("ISBN")
titles.push("Références")

var inputs = new Array()
inputs.push("Éléments de programmation de modèles (détection par [[Projet:Correction syntaxique]])")
inputs.push("Modèles (détection par [[Projet:Correction syntaxique]])")
inputs.push("Titre de section (détection par [[Projet:Correction syntaxique]])")
inputs.push("Balise <small> dans un texte déjà réduit (détection par [[Projet:Correction syntaxique]])")
inputs.push("Balise HTML <XXXX> (détection par [[Projet:Correction syntaxique]])")
inputs.push("Catégorie (détection par [[Projet:Correction syntaxique]])")
inputs.push("Lien interne (détection par [[Projet:Correction syntaxique]])")
inputs.push("Lien externe (détection par [[Projet:Correction syntaxique]])")
inputs.push("Lien interwiki (détection par [[Projet:Correction syntaxique]])")
inputs.push("ISBN (détection par [[Projet:Correction syntaxique]])")
inputs.push("Références (détection par [[Projet:Correction syntaxique]])")
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
}
}

$(DeluxeSummary);

});