[Commons-l] Javascript-Extension Configuration-Framework

Magnus Manske magnusmanske at googlemail.com
Thu Jul 5 11:02:57 UTC 2007


On 7/5/07, Dschwen <lists at schwen.de> wrote:
> With the increasing amount of Javascript code included in the default
> configuration of Commons I feel the need for a convenient configuration
> mechanism to enable and disable specific extensions and to set customizable
> parameters.
>
> I created such a framework here:
> http://commons.wikimedia.org/wiki/MediaWiki:JSconfig.js
>
> It allows the creation of parameters (with descriptions and default values).
> These parameters are used to dynamically generate a new Tab in on the
> MediaWiki Preferences page. The preferences on this page are saved as cookies
> (and automatically restored from the cookies).
>
> Extensions can conveniently define a parameter set and query it without having
> to worry about a user interface to change them and a logic to store them.
>
> It needs some further polishing to make the preferences page more structured,
> but I allready have some ideas. If this gets adopted I'll certainly put some
> more work into it.

Nice idea!

Does it work for someone (like me) using several machines? Or do I
always ges settings "per machine"? This might actually be desireable
(different screen resolution etc.) in some cases.

While you're working on easier configuration:
How about a function "load_user_script(stuff)" that one can add to
monobook.js to wrap up the document.write orgy?

Magnus



More information about the Commons-l mailing list