https://bugzilla.wikimedia.org/show_bug.cgi?id=27771
Summary: Mechanism for loading site wide libraries
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l