Difference between revisions of "MediaWiki:Editbar.js"
m (The removal of default buttons with tricksy JavaScript was sketchy at best. So forget it.) |
m |
||
Line 18: | Line 18: | ||
addCustomButton('images/0/07/Editbar_Underline.png', 'Underlined text', '{{Underline|', '}}', 'Underlined text'); | addCustomButton('images/0/07/Editbar_Underline.png', 'Underlined text', '{{Underline|', '}}', 'Underlined text'); | ||
addCustomButton('images/9/9f/Editbar_Line_Break.png', 'Line Break', '{{Line Break}}', '', ''); | addCustomButton('images/9/9f/Editbar_Line_Break.png', 'Line Break', '{{Line Break}}', '', ''); | ||
− | addCustomButton('images/f/fe/Editbar_Category.png', ' | + | addCustomButton('images/f/fe/Editbar_Category.png', 'Categorize', '{{Categorize|', '}}' , 'Category Name'); |
addCustomButton('images/a/a0/Editbar_Redirect.png', 'Redirect', '#REDIRECT [[', ']]', 'Target page name'); | addCustomButton('images/a/a0/Editbar_Redirect.png', 'Redirect', '#REDIRECT [[', ']]', 'Target page name'); | ||
} | } |
Revision as of 11:01, 31 March 2010
/** * Adds a custom button. */ function addCustomButton(imageFile, speedTip, tagOpen, tagClose, sampleText) { mwCustomEditButtons.push({ 'imageFile' : imageFile, 'speedTip' : speedTip, 'tagOpen' : tagOpen, 'tagClose' : tagClose, 'sampleText' : sampleText }); } /** * Add extra buttons to the edit menu. */ if (mwCustomEditButtons) { addCustomButton('images/0/07/Editbar_Underline.png', 'Underlined text', '{{Underline|', '}}', 'Underlined text'); addCustomButton('images/9/9f/Editbar_Line_Break.png', 'Line Break', '{{Line Break}}', '', ''); addCustomButton('images/f/fe/Editbar_Category.png', 'Categorize', '{{Categorize|', '}}' , 'Category Name'); addCustomButton('images/a/a0/Editbar_Redirect.png', 'Redirect', '#REDIRECT [[', ']]', 'Target page name'); }