MediaWiki:Gadget-extra-toolbar-buttons-core.js: Difference between revisions

Content deleted Content added
m Mr. Stradivarius moved page MediaWiki:Common.js/edit.js to MediaWiki:Gadget-extra-toolbar-buttons-core.js without leaving a redirect: turn this into a ResourceLoader module per [[Special:PermaLink/735726304#Convert watchlist notices into a Reso...
fix
 
(2 intermediate revisions by 2 users not shown)
Line 104:
mw.loader.using( 'user.options', function () {
// This can be the string "0" if the user disabled the preference ([[bugzilla:52542#c3]])
if ( mw.user.options.get( 'usebetatoolbar' ) != 1 && mw.user.options.get( 'showtoolbargadget-legacyToolbar' ) == 1 ) {
mw.hook("mw.toolbar").thenadd( addExtraButtons );
$.when(
mw.loader.using( 'mediawiki.toolbar' ),
$.ready
).then( addExtraButtons );
}
} );
 
/**
* Fix edit summary prompt for undo
*
* Fixes the fact that the undo function combined with the "no edit summary prompter"
* causes problems if leaving the edit summary unchanged.
* Added by [[User:Deskana]], code by [[User:Tra]].
* See also [[bugzilla:8912]].
*/
$(function () {
if (document.___location.search.indexOf('undo=') !== -1 && document.getElementsByName('wpAutoSummary')[0]) {
document.getElementsByName('wpAutoSummary')[0].value = '1';
}
});