Follows-up
e5502d1f and
63c36506.
Per the plan[1], after a few weeks of migration, the jQuery Migrate plugin
will be disabled in MediaWiki core.
The added configuration variable allows sysadmins to continue to use code
that is not yet compatible with jQuery 1.9 and higher (e.g. extensions
and/or gadgets that still use legacy jQuery functionality).
[1] http://www.mail-archive.com/wikitech-l@lists.wikimedia.org/msg75735.html
Bug: 44740
Change-Id: If1c9ab722c7ce025b550b457506dcdf90d3326c3
* (bug 49156) Added the mediawiki.cookie ResourceLoader module, which wraps
jQuery.cookie so that getting/setting a cookie is syntactically and functionally
similar to using the WebRequest#getCookie/WebResponse#setcookie methods.
-* (bug 44740) jQuery upgraded from 1.8.3 to 1.11.1.
+* (bug 44740) jQuery upgraded from 1.8.3 to 1.11.1. A new configuration option,
+ $wgIncludejQueryMigrate, also loads the jQuery Migrate hack to let extensions
+ and gadgets use the long-deprecated functions that were removed in jQuery 1.9.
+ This option is turned off by default, and will be removed in MediaWiki 1.25.
* Changes to content typography (fonts, etc.). See
https://www.mediawiki.org/wiki/Typography_refresh for further information.
* WikitextContent will now render redirects with the expected "redirect"
*/
$wgIncludeLegacyJavaScript = true;
+/**
+ * Whether to include the jQuery Migrate library, which lets legacy JS that
+ * requires jQuery 1.8.x to work and breaks with 1.9.x+.
+ *
+ * @since 1.24
+ * @deprecated since 1.24, to be removed in 1.25
+ */
+$wgIncludejQueryMigrate = false;
+
/**
* Whether to preload the mediawiki.util module as blocking module in the top
* queue.
/* jQuery */
'jquery' => array(
- 'scripts' => array(
- 'resources/lib/jquery/jquery.js',
- 'resources/lib/jquery/jquery.migrate.js',
- ),
+ 'scripts' => ( $GLOBALS['wgIncludejQueryMigrate'] ?
+ array(
+ 'resources/lib/jquery/jquery.js',
+ 'resources/lib/jquery/jquery.migrate.js'
+ ) :
+ array(
+ 'resources/lib/jquery/jquery.js'
+ ) ),
'debugRaw' => false,
'targets' => array( 'desktop', 'mobile' ),
),