Allow "user gadgets" to be defined within user space. Similar to site gadgets, they are ResourceLoader modules consisting of one or more scripts, stylesheets and JSON files. They can specify other RL modules, including other user gadgets, as dependencies.
Users can enable user gadgets written by authors they trust through a GUI in gadgets tab at Special:Preferences.
- User gadgets bring in native support in MediaWiki for user scripts which until now were supported rather unofficially via loading in scripts from the personal common.js page
- Provides the benefits of ResourceLoader minimisation and caching for user scripts which as of now is applied only to the common.js page (and not to pages imported from there). T27845 was declined in favour of this one.
- Enables effective use of Codex/Vue.js in which components are separate package files (currently doable only in site gadgets). T334438
- Allows us to extend the feature in future to bring in greater control if necessary, such as by:
- Not allowing unconfirmed users to create gadgets
- Allowing admins to disable an insecure gadget for everyone without deleting the page
- The GUI can be extended to allow specifying per-site CSP opt-ins for external domains accessed by these scripts T208188