Extension talk:Gadgets/Archive

Default switch
How about a default switch that enables a gadget by default until the user removes the checkbox by himself? I envision a syntx like: * mygadget|mygadget.js|mygadget.css|on This would be very useful for gadgets that are enabled by default but people perhapes want to deactivate themselves, such as commons:MediaWiki:Extra-tabs.js. However this collides with current MdiaWiki:Common.js and MediaWiki:Monobook.js but switching all scripts on and off in one place would be a very nice thing. Arnomane 14:20, 13 September 2007 (UTC)
 * Hm.... maybe :) Don't have time to play with it right now, remind me if i forget. -- Duesentrieb ⇌ 21:59, 13 September 2007 (UTC)
 * I agree this feature would be very useful, please count this as a reminder ∴ AlexSm 00:42, 20 December 2007 (UTC)

css/js file name format
What is the point of requiring files to be in MediaWiki:Gadget-xxx format? Some of the user scripts are on a user subpage, and even for the rest it seems uncomfortable. It will result in css/js "redirects" containing only an @import/document.write loading the real script, which means browsers will need to download two files instead of one. --Tgr 21:48, 19 December 2007 (UTC)
 * You're supposed to copy the code into MediaWiki:Gadget-xxx.js page. This is done intentionally so only admins can alter the code, however I agree this is definitely not convenient for non-admin scripts authors ∴ AlexSm 00:42, 20 December 2007 (UTC)

css/js user subpages can also be edited by admins only, plus the one user who owns the subpage (and, being the script author, is probably trusted), so not much difference there. --Tgr 13:20, 24 December 2007 (UTC)

Usage stats
Another Gadgets disadvantage (compared to standard userscript) is that you don't know how many users enabled particular gadget. Would it be possible to fix this? ∴ AlexSm 00:42, 20 December 2007 (UTC)

Enable by default
How can you enable a gadget by default? I think something with $wgDefaultUserOptions, but that does not seem to work. SPQRobin 15:01, 25 December 2007 (UTC)


 * See the first comment on this page.
 * Anyway, using $wgDefaultUserOptions should work: For the gadget "foo", try $wgDefaultUserOptions['gadget-foo'] = true; that should work (for anons(!) and new users), but i have not tried it. -- Duesentrieb ⇌ 20:42, 25 December 2007 (UTC)


 * I just tried it, and it does not work. SPQRobin 16:36, 26 December 2007 (UTC)

Substantial addition
I was thinking about the abillity to make w:WP:TW as a gadget, but at the moment there are some things missing to make it work. → Aza Toth 22:53, 29 December 2007 (UTC)
 * First it should be possible to add the whole twinkle as a bundle, but at the same time select and unselect individual modules.
 * All modules will depend on a common library (morebits.js), but it should only be included once.
 * As it won't work under IE, there should be possible to exclude the ability for IE user to use the gadget.
 * There should be a nice way to handle preferences, including strings, booleans, arrays etc... It should be locality independent (i.e. be saved on the server).
 * Some modules are only suitable for admins, so some checks there as well.
 * Admins must be able to remove modules from users.