https://bugzilla.wikimedia.org/show_bug.cgi?id=40124

--- Comment #19 from Bartosz DziewoƄski <[email protected]> 2012-12-03 
21:29:38 UTC ---
(In reply to comment #18)
> (In reply to comment #14)
> > [I]'d use 'userjs-' as the prefix, as 'ujs-' isn't too obvious.
> 
> I'd recommend using a prefix like "gadget" instead since "user scripts" are
> something else ("user scripts" are non-modularised subpages of a User page).

Yes, and those might want to use this as well. Also, this would theoretically
go into core, where there's no notion of 'gadgets'.


> As for whether we should support allowing arbitrary keys in user preferences
> storage, I think not. For the following reasons:
> 
> * It can easily conflict with core or extension preferences.

A documented prefix would prevent that.


> * There is no central registry. No rules, no validation, no labels, no
> documentation. It doesn't have a default-value system or any other system.

The default value is 'undefined'. The rest would be handled by each script
itself.


> * It can easily conflict with other gadgets, site scripts and user scripts.

It seems obvious to me that scripts would each have to use a prefix as well.


> So what about the use case mentioned in comment 0? That is valid indeed and 
> has
> been filed as bug 21897. In fact implementation has already began in Salvatore
> Ingala's branch of the Gadgets extension. It implements a small dedicated
> key/value storage for gadgets that want it. It has value type validation and
> will provide them in-context.

It's all very nice, but I was hoping for something that could be reimplemented
within my lifetime.

Especially since I already implemented what you're describing myself on
pl.wiki, basing it on cookies + the undocumented options API that worked at the
time. (I decided to do it due to the glacial pace of changes in MW itself - I
know WMF engineers are overworked.) I was hoping that it could be allowed to
work again. (Linked above, it's called gConfig, implemented as a gadget[1].)

[1] https://pl.wikipedia.org/wiki/MediaWiki:Gadget-gConfig.js

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to