MediaWiki talk:Common.js

Shared Anime-Common js
Since Wikia has updated to MW1.19 now, shouldn't we now be using ? I know it won't make a big difference as such but why not?—
 * No. This stuff isn't available through modules. And for absolute urls there isn't much advantage. ~ Daniel Friesen (DanTMan, Nadir Seen Fire) (Local Talk &#8285; Animanga Talk) 08:21, November 4, 2012 (UTC)
 * importScriptURI is part of the mediawiki.legacy.wikibits module, as implied by the "legacy" part, that's going to disappear eventually. mw.loader is part of the mediawiki module so it isn't going anywhere.
 * You could use $.getScript instead as well.—


 * It actually sounds more like importScriptURI may stay around longer than wikibits. In any case wikibits will stay around longer than js wg globals will. And importScriptPage style functions don't exist in any other form. ~ Daniel Friesen (DanTMan, Nadir Seen Fire) (Local Talk &#8285; Animanga Talk) 06:48, November 5, 2012 (UTC)
 * O.o
 * importScriptPage is Wikia specific. That's being replaced by importArticles. importScript currently has no replacement since the MW devs seem to be stuck in a "perfect solution is just over the hill" mindset that prevents them from actually fixing ResourceLoader, but importScriptURI is already replaced by mw.loader.load so that may go away even though importScript probably won't for a while. (importScript/importScriptPage are very simple functions, modifying them to use mw.loader internally would be easy and would completely remove the need for importScriptURI)

wikibits actually has a control flag on the server (mw:Manual:$wgIncludeLegacyJavaScript) which can be switched off to remove it. It will probably be a few years before it's off by default then a bit more before Wikia turn it off as well though. Deprecations list is here: ResourceLoader/JavaScript Deprecations.—