Currently you cannot load anything before gadgets. This should load libraries and scripts that only use jquery, wikibits and other basic MW scripts.
I think the best mechanism would be gadgets based. By that I mean to load scripts defined on a special page like this:
- some_lib.js
- other-lib.js{*}
- Some AdvancedEditing Stuff.js {user.autoconfirmed,edit,ns[0]}
- ForSpecialOnSpecial.js{user.bureaucrat,ns.Special,user.sysop}
All scripts would be loaded in order given. The scripts would have a common prefix e.g. "MediaWiki:Lib-".
Parsing:
/[\r\n]# *([^|{}]+) *\{(.+)\}/
- $1 - script page name without the prefix
- $2 - options (CSV, order not important)
Options:
- "*" - for all on all pages (default)
- edit - only when editing
- user.groupname - only for users with given
- ns[name space number]
- ns.CanonicalNamespaceName
Additionally a section for scripts to be loaded without parsing with RL would be nice. Something like:
Load == <-- optional section heading
#stdlib
Minification off == <-- case insensitive section name
- SomethingSpecialAndVerySpecific
- http://maybe.even.external/script.js?
Would be great to have built into RL.
Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=27488