mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 10:52:27 +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 );
|