mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Add languages/all route for LanguageInfo overlay
Depends-On: Ic0f1613e8fd27788f67ed6235386491f0fe077c3 Bug: T232410 Change-Id: Ib558dc7c46cc56ff667957f9126bbe0471d25b8e
This commit is contained in:
parent
2bb3633530
commit
f915d69872
|
@ -11,6 +11,7 @@ module.exports = function () {
|
|||
// eslint-disable-next-line no-restricted-properties
|
||||
mobile = mw.mobileFrontend.require( 'mobile.startup' ),
|
||||
PageGateway = mobile.PageGateway,
|
||||
LanguageInfo = mobile.LanguageInfo,
|
||||
permissions = mw.config.get( 'wgMinervaPermissions' ) || {},
|
||||
toast = mobile.toast,
|
||||
Icon = mobile.Icon,
|
||||
|
@ -129,6 +130,13 @@ module.exports = function () {
|
|||
overlayManager.add( /^\/languages$/, function () {
|
||||
return mobile.languageOverlay( new PageGateway( api ) );
|
||||
} );
|
||||
// Register a LanguageInfo overlay which has no built-in functionality;
|
||||
// a hook is fired when a language is selected, and extensions can respond
|
||||
// to that hook. See GrowthExperiments WelcomeSurvey feature (in gerrit
|
||||
// Ib558dc7c46cc56ff667957f9126bbe0471d25b8e for example usage).
|
||||
overlayManager.add( /^\/languages\/all$/, function () {
|
||||
return mobile.languageInfoOverlay( new LanguageInfo( api ) );
|
||||
} );
|
||||
|
||||
// Setup
|
||||
$( function () {
|
||||
|
|
Loading…
Reference in a new issue