mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
Hygiene: Remove unnecessary IIFE in gateway/mediawiki.js
Change-Id: If6d76c2915b13f9871dea3b7f33cb74ec5906566
This commit is contained in:
parent
0260325bb9
commit
f1e6e2bfa1
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue