Stop using deprecated jquery.json module

Not loading the "json" module either, because of backwards compatibility
and because we are likely already blacklisting browsers which don't
support json natively (mainly IE7 and older and IE8 not in standards mode)

Change-Id: I80b9eb9a7c224b5c843d42c36aca4c5e9f20c207
This commit is contained in:
Niklas Laxström
2014-07-12 19:20:22 +02:00
parent d5a3327579
commit fe4e101851
2 changed files with 2 additions and 3 deletions

View File

@@ -71,7 +71,6 @@ $wgResourceModules['ext.uls.init'] = array(
'dependencies' => array(
'mediawiki.Uri',
'jquery.client',
'jquery.json',
'jquery.cookie',
),
'position' => 'top',

View File

@@ -104,7 +104,7 @@
mw.uls.setPreviousLanguages = function ( previousLanguages ) {
$.cookie( mw.uls.previousLanguagesCookie,
$.toJSON( previousLanguages ), {
JSON.stringify( previousLanguages ), {
path: '/'
}
);
@@ -118,7 +118,7 @@
}
// return last 5 language changes
return $.parseJSON( previousLanguages ).slice( -5 );
return JSON.parse( previousLanguages ).slice( -5 );
};
/**