MediaWiki:Gadget-lib-toolbar.js: Różnice pomiędzy wersjami
Usunięta treść Dodana treść
drobne techniczne |
nowa wersja |
||
Linia 6:
window.toolbarGadget = {
/** Version of the gadget */
version:
/** A status of the
/** Indicates wheter the user has enabled the new toolbar */
wikieditor: null,
/** An array of buttons, which were added before a toolbar was constructed */
buttons: [],
Linia 26 ⟶ 28:
*/
addButton: function( button ) {
if ( !this.
this.buttons.push( button );
return;
Linia 130 ⟶ 132:
}
},
/** Sets up the gadget */
init: function() {
this.wikieditor = mw.user.options.get( 'usebetatoolbar' ) === 1;
this.pageLoaded = true;▼
this.addButton( this.buttons[i] );▼
jQuery( document ).ready( function() {
for ( var i = 0; i < that.buttons.length; i++ ) {
}
} );▼
};
if ( this.wikieditor ) {
addButtons();
} else {
mw.loader.using( "mediawiki.action.edit", function() {
addButtons();
} );
}
▲ this.buttons = null;
}
};
▲ mw.loader.using( "mediawiki.legacy.wikibits", function() {
▲ hookEvent( 'load', function() {
▲ toolbarGadget.init();
▲ } );
▲ } );
}
|