MediaWiki:Common.js/edit.js: Difference between revisions

it should already be loaded, so let's try this
(testing for mw.toolbar)
(it should already be loaded, so let's try this)
Line 175: Line 175:
} );
} );
} else {
} else {
    if (mw.toolbar) {alert("mw.toolbar already loaded.");}
                     if (mw.toolbar) {
                     mw.loader.using( 'mw.toolbar', function () {
if (mw.toolbar) {alert("mw.toolbar just loaded.");}
// Use the old edit toolbar
// Use the old edit toolbar
// Add the MediaWiki standard buttons into the available buttons
// Add the MediaWiki standard buttons into the available buttons
Line 205: Line 203:
// Remove the default buttons (if requested by the user)
// Remove the default buttons (if requested by the user)
//eraseButtons();
//eraseButtons();
  });
  }
                } else {
                  alert("mw.toolbar was not loaded in time for the custom editing toolbar.");
                 }
                 }
         } );
         } );