MediaWiki:Common.js
From SiefarWikiEn
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Clear the cache in Tools → Preferences
/* Tout JavaScript ici sera chargé avec chaque page accédée par n’importe quel utilisateur. */
function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) {
mwCustomEditButtons[mwCustomEditButtons.length] =
{"imageId": imageId,
"imageFile": imageFile,
"speedTip": speedTip,
"tagOpen": tagOpen,
"tagClose": tagClose,
"sampleText": sampleText};
}
addCustomButton('http://upload.wikimedia.org/wikipedia/commons/8/88/Btn_toolbar_enum.png',
'Énumération',
'\n# élément 1\n# élément 2\n# élément 3',
'',
'',
'mw-editbutton-enum');
addCustomButton('http://upload.wikimedia.org/wikipedia/commons/1/11/Btn_toolbar_liste.png',
'Liste',
'\n* élément A\n* élément B\n* élément C',
'',
'',
'mw-editbutton-liste');