mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-01 10:56:44 +00:00
21 lines
445 B
JavaScript
21 lines
445 B
JavaScript
|
( function ( $, mw ) {
|
||
|
'use strict';
|
||
|
|
||
|
// Functions that are only available to echo desktop version
|
||
|
mw.echo.desktop = {
|
||
|
/**
|
||
|
* Append uselang param to API get/post data if applicable
|
||
|
* @param apiData {Object}
|
||
|
*/
|
||
|
appendUseLang: function ( apiData ) {
|
||
|
var curUri = new mw.Uri();
|
||
|
if ( curUri.query.uselang !== undefined ) {
|
||
|
apiData.uselang = curUri.query.uselang;
|
||
|
}
|
||
|
|
||
|
return apiData;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
} )( jQuery, mediaWiki );
|