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:
@@ -71,7 +71,6 @@ $wgResourceModules['ext.uls.init'] = array(
|
||||
'dependencies' => array(
|
||||
'mediawiki.Uri',
|
||||
'jquery.client',
|
||||
'jquery.json',
|
||||
'jquery.cookie',
|
||||
),
|
||||
'position' => 'top',
|
||||
|
||||
@@ -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 );
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user