User:Base/custumedittoolbar.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:Base/custumedittoolbar. |
//<nowiki>
var customizeToolbar = function() {
/* Your code goes here */
//вкладка Ботоперенос
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'botomove': {
'type': 'booklet', // Can also be 'booklet'
'label': 'Ботоперенос'
// or 'labelMsg': 'section-emoticons-label' for a localized label
}
}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'botomove',
'pages': {
'emoticons': {
'layout': 'characters',
'label': 'Дооформлення',
'characters': [ '{{int:filedesc}}', '{{int:license}}', '{{own}}', '[[:uk:user:|', ']]', '{{unknown|author}}', '{{unknown|date}}' ]
}
}
} );
};
/* Check if we are in edit mode and the required modules are available and then customize the toolbar */
if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
mw.loader.using( 'user.options', function () {
if ( mw.user.options.get('usebetatoolbar') ) {
mw.loader.using( 'ext.wikiEditor', function () {
$(document).ready( customizeToolbar );
} );
}
} );
}
//</nowiki>