Hygiene: Remove unnecessary IIFE in gateway/mediawiki.js

Change-Id: If6d76c2915b13f9871dea3b7f33cb74ec5906566
This commit is contained in:
joakin 2017-02-14 21:16:55 +01:00
parent 0260325bb9
commit f1e6e2bfa1
3 changed files with 89 additions and 92 deletions

Binary file not shown.

Binary file not shown.

View file

@ -1,8 +1,7 @@
( function ( mw ) {
var EXTRACT_LENGTH = 525,
// Public and private cache lifetime (5 minutes)
CACHE_LIFETIME = 300;
CACHE_LIFETIME = 300,
createModel = require( '../preview/model' ).createModel;
/**
* MediaWiki API gateway factory
@ -94,7 +93,7 @@
* @returns {ext.popups.PreviewModel}
*/
function convertPageToModel( page ) {
return mw.popups.preview.createModel(
return createModel(
page.title,
page.canonicalurl,
page.pagelanguagehtmlcode,
@ -105,5 +104,3 @@
}
module.exports = createMediaWikiApiGateway;
}( mediaWiki ) );