User:Rocket000/customEditButtons.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:Rocket000/customEditButtons. |
//<nowiki>
function addButton() {
return;
}
if(mwCustomEditButtons) {
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/9/99/Button_reflink_advanced_2.png',
'speedTip': 'Gallery-to-category redirect',
'tagOpen': '#REDIRECT [[:Category:',
'tagClose': ']]',
'sampleText': wgTitle
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/2/26/Button_plainlinks.png',
'speedTip': 'Plainlinks',
'tagOpen': '<span class=\'plainlinks\'>',
'tagClose': '</span>',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/1/1e/Button_font_color.png',
'speedTip': 'Colored text',
'tagOpen': '<span style=\'color:#COLOR\'>',
'tagClose': '</span>',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/4/48/Break-button-bg.png',
'speedTip': 'Line break',
'tagOpen': '<br/>',
'tagClose': '',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/b/ba/Button_conserver.png',
'speedTip': 'Support',
'tagOpen': '* {{Support}} ',
'tagClose': ' ~~~~',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/f/fc/Button_supp.png',
'speedTip': 'Oppose',
'tagOpen': '* {{Oppose}} ',
'tagClose': ' ~~~~',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/4/4e/Button_neutre.png',
'speedTip': 'Neutral',
'tagOpen': '* {{Neutral}} ',
'tagClose': ' ~~~~',
'sampleText': ''
});
/*
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/a/a0/Button_keep.png',
'speedTip': 'Keep',
'tagOpen': '* {{vk}} ',
'tagClose': ' ~~~~',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/1/13/Button_delete.png',
'speedTip': 'Delete',
'tagOpen': '* {{vd}} ',
'tagClose': ' ~~~~',
'sampleText': ''
});
*/
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/c/c0/Knop_onzijdig.png',
'speedTip': 'VN',
'tagOpen': '{{VN\n|en=',
'tagClose': '\n}}',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/9/97/Button_S_italic.png',
'speedTip': 'Start SN',
'tagOpen': "{{SN\n|''",
'tagClose': '\n}}',
'sampleText': ''
});
var g = wgTitle.split(' ')[0];
var s = wgTitle.split(' ')[1];
if(s != undefined) s1 = '|'+s; else s1 = '';
if(s != undefined) s2 = '\n|species='+s; else s2 = '';
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/b/b0/Button_category02.png',
'speedTip': 'Species category',
'tagOpen': '[[Category:'+g++s1+']]',
'tagClose': '',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png',
'speedTip': '{{Lepidoptera}}',
'tagOpen': '{{Lepidoptera\n|familia=\n|subfamilia=\n|tribus=\n',
'tagClose': '',
'sampleText': ''
});
mwCustomEditButtons.push({
'imageFile': 'http://upload.wikimedia.org/wikipedia/commons/9/97/Template_button.png',
'speedTip': '{{Lepidoptera}}',
'tagOpen': '|genus='+g+s2+'\n|auth=',
'tagClose': '\n}}',
'sampleText': ''
});
/*
http://upload.wikimedia.org/wikipedia/commons/b/b8/Button_number_0.png
http://upload.wikimedia.org/wikipedia/commons/8/8e/Button_number_1.png
http://upload.wikimedia.org/wikipedia/commons/b/bd/Button_number_2.png
http://upload.wikimedia.org/wikipedia/commons/8/80/Button_number_3.png
*/
}
//</nowiki>