Thread:Talk:ResourceLoader/Default modules/Can't tell what is a module name and what not/reply (4)

Thank you very much for the nice answer. After fighting every possible problem while maintaining my user script (which is also used by many other users) I think I understand most parts of that crazy nesting hell. (Except for the  stuff. I would really like to understand that.) Everything there is required for some reason: Make sure the options are loaded. Check one of the options. If it's enabled make sure an other module is loaded. Wait for it (I think that's what the  does but I don't understand how). Apply the button.

However, to make this usable for an average user there needs to be a simplified way to write it like this without loosing any functionality: import('user.options'); if (mw.user.options.get('usebetatoolbar')) {   import('ext.wikiEditor.toolbar'); $('#wpTextbox1').wikiEditor('addToToolbar', /* … */); }