User:Coyau/ToolbarMH.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
![]() |
Documentation for this user script can be added at User:Coyau/ToolbarMH. |
/**************************************************************************/
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
/* BOUTONS D'EDITION */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
$(function() {
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) === -1 || !mw.toolbar)
return;
$.each([
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
[
'\{\{Mérimée|type=classé+inscrit|', '}}',
'7/79/Button_MH_red',
'Mérimée database',
'',
'mw-editbutton-merimee'
],
[
'\{\{Palissy|type=classé+inscrit|', '}}',
'1/17/Button_MH_black',
'Palissy database',
'',
'mw-editbutton-palissy'
]
], function(_, button) {
mw.toolbar.addButton('//upload.wikimedia.org/wikipedia/commons/' + button[2] + '.png', button[3], button[0], button[1], (button[0] ? button[4] : ''), 'mw-editbutton-' + button[4]);
});
});