mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-12-19 03:10:47 +00:00
18 lines
300 B
JavaScript
18 lines
300 B
JavaScript
|
let /** @type {MwApi} */ api;
|
||
|
|
||
|
/**
|
||
|
* @param {Object<string,string|number>} options
|
||
|
* @return {JQuery.Promise<Object>}
|
||
|
*/
|
||
|
function saveOptions( options ) {
|
||
|
api = api || new mw.Api();
|
||
|
// @ts-ignore
|
||
|
return api.saveOptions( options, {
|
||
|
global: 'update'
|
||
|
} );
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
saveOptions
|
||
|
};
|