(from [Wikitech-l] Future: Love for the sister projects!)
What are the differences between
mw.loader.load( 'http://centralwiki.org/w/load.php?modules=ext.gadget.foo');
and
mw.loader.load( '
http://centralwiki.org/w/load.php?title=MediaWiki:Gadget-foo.js&action=…
);
which is currently the recommended way in the migration guide[2]?
Helder
On Sun, Apr 3, 2011 at 18:12, Krinkle <krinklemail(a)gmail.com> wrote:
= New way =
This way is promoted in the migration here [2] to start centralizing
gadgets and
avoid stuff from getting out of date. (navPopups, HotCat, UTCLiveClock,
WikiMiniAtlas etc.) :
== Central wiki ==
* MediaWiki:Gadget-definitions
* foo[ResourceLoader]|foo.js|foo.css
* MediaWiki:Gadget-foo
This is Foo description.
* MediaWiki:Gadget-foo.js
alert('foo');
* MediaWiki:Gadget-foo.css
body { background: orange; }
== Other wiki ==
* MediaWiki:Gadget-definitions
* foo|foo.js
* MediaWiki:Gadget-foo
This is Foo description.
* MediaWiki:Gadget-foo.js
mw.loader.load( '
http://centralwiki.org/w/load.php?modules=ext.gadget.foo'
);
This new way not only centralizes stuff (like the old way did) but
also does all resource loader stuff
(1 request, minified, combined, cached)
This is already a huge improvement and can and is being done today.
Once global preferences are up and RL 2.0 is in the air, it would be
even easier.
ie. extra section in Special:Preferences#Gadgets with "global gadgets"
and
MediaWiki:Gadgets-globaldefinition is used and meta.wikimedia/load.php
--
Krinkle
[1]
https://bugzilla.wikimedia.org/show_bug.cgi?id=14950
[2]
http://www.mediawiki.org/wiki/RL/MGU#Keep_gadgets_central
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l