I'm a coding guy from several wikis at FANDOM (formerly known as Wikia). FANDOM is running MediaWiki v1.19 (what a shame), so it's technically able to use the Gadgets extension. I was wondering when I did an api request to get all my activated gadgets, what query.gadgets.metadata.settings.shared means. Is it something like the current "dependencies" option?
close, but this won't create the desired effect exactly - what the OP asked for would allow for registered users to "opt-in", while your solution does not. however, this is the closest i can think of with a single script.
alternatively, you could play a little variation on the above: call the gadget directly from common.js under the condition "mw.user.anonymous()", and make the gadget non-default.
I'd recommend do making it as a gadget to allow optimized loading of it as well as internalization. Simply make it a normal gadget that doesn't have [default] but does have [ResourceLoader]. And from MediaWiki:Common.js (as קיפודנחש suggested), call mw.loader.load('gadget.YOUR_GADGET_ID') under a conditional:
For the record: the mw.loader.load can also be in a default gadget hidden from preferences with the "|rights=hidden" hack (example) or with the native "hidden" option from the next version of the gadgets extension.
Hi, just a feature request. It would be great to be able to rename a gadget (in MediaWiki:Gadgets-definition plus renaming the corresponding MediaWiki:Gadget-Foobar page), while keeping the users' preferences about its activation state.