I have migrated Extra-Editbuttons Gadget from Persian Wikipedia for Persian Wikivoyage to be compatible with ResourceLoader, but now it's broken!
It seems like the following code doesn't run after page loads:
$(function(){ mw.loader.using( [ 'ext.wikiEditor.toolbar' ], function () { extraeditbuttons.init(); }); });
when you run above code manually using js console, it works.