Dev: Access OverlayManager via singleton method not M.define

Change-Id: Icb152f21bfd3a091676980a025dc651e49f49312
This commit is contained in:
jdlrobson 2019-09-05 16:52:27 -07:00 committed by Jdlrobson
parent 4d24e068eb
commit 96cee263fb
3 changed files with 3 additions and 5 deletions

View file

@ -4,7 +4,8 @@ module.exports = function () {
mobile = M.require( 'mobile.startup' ),
loader = mobile.rlModuleLoader,
features = mw.config.get( 'wgMinervaFeatures', {} ),
overlayManager = require( 'skins.minerva.scripts' ).overlayManager,
OverlayManager = mobile.OverlayManager,
overlayManager = OverlayManager.getSingleton(),
eventBus = mobile.eventBusSingleton,
isAnon = mw.user.isAnon();

View file

@ -357,7 +357,4 @@
isSmall: true
} ).$el.appendTo( '.toctitle' );
} );
module.exports = {
overlayManager: overlayManager
};
}( mw.mobileFrontend ) );

View file

@ -11,7 +11,7 @@
$talk = $( '.talk, [rel="discussion"]' ),
// use the plain return value here - T128273
title = $talk.attr( 'data-title' ),
overlayManager = require( 'skins.minerva.scripts' ).overlayManager,
overlayManager = mobile.OverlayManager.getSingleton(),
// FIXME: This dependency shouldn't exist
skin = mobile.Skin.getSingleton(),
inTalkNamespace = false,