|
|
Zeile 1: |
Zeile 1: |
− | var customizeToolbar = function () {
| |
− | var $box = $('#wpTextbox1');
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'bangla',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'tamil',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'telugu',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'sinhala',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'devanagari',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'gujarati',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'thai',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'lao',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'khmer',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'canadianaboriginal',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'cyrillic',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'arabic',
| |
− | });
| |
− | $box.wikiEditor( 'removeFromToolbar', {
| |
− | 'section': 'characters',
| |
− | 'page': 'arabicextended',
| |
− | });
| |
− | };
| |
| | | |
− | /* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
| |
− | if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
| |
− | mw.loader.using( 'user.options' ).then( function () {
| |
− | // This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
| |
− | if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
| |
− | $.when(
| |
− | mw.loader.using( 'ext.wikiEditor' ), $.ready
| |
− | ).then( customizeToolbar );
| |
− | }
| |
− | } );
| |
− | }
| |