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

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-".

`/[\r\n]# *([^|{}]+) *\{(.+)\}/`
* $1 - script page name without the prefix
* $2 - options (CSV, order not important)

* "*" - 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
== Minification off == <-- case insensitive section name
# SomethingSpecialAndVerySpecific
# http://maybe.even.external/script.js?

Would be great to have built into RL.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to