diff --git a/Gadget-EditToolbar.js b/Gadget-EditToolbar.js index 902a777a..efbc139f 100644 --- a/Gadget-EditToolbar.js +++ b/Gadget-EditToolbar.js @@ -1,28 +1,8 @@ ( function(w) { - var customInsButtons = {}; - var customMiscButtons = {}; - - w.setCustomInsButton = function(code, left, middle, right, shownText, title) { - customInsButtons[code] = [left, middle, right, shownText, title]; - }; - - w.setCustomMiscButton = function(code, codeToRun, shownText, title) { - customMiscButtons[code] = [codeToRun, shownText, title]; - }; - // define fake API as fallback when core is not loaded - w.rmCustomInsButtons = - w.rmCustomMiscButtons = - w.rmCustomButtons = w.putToolbar = function() {}; - w.customInsButtons = - w.customMiscButtons = {}; if ($.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1) { - mw.loader.using('ext.gadget.EditToolbar-core', function () { - $.extend(w.customInsButtons, customInsButtons); - $.extend(w.customMiscButtons, customMiscButtons); - }); + mw.loader.load('ext.gadget.EditToolbar-core'); } - }(window) ); \ No newline at end of file