mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Merge "Minerva is responsible for loading tablet modules in tablet mode"
This commit is contained in:
commit
1c0d0d5f3c
|
@ -2,6 +2,7 @@
|
|||
var inSample, inStable, experiment,
|
||||
toast = M.require( 'mobile.startup/toast' ),
|
||||
time = M.require( 'mobile.startup/time' ),
|
||||
browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
|
||||
token = mw.storage.get( 'mobile-betaoptin-token' ),
|
||||
BetaOptinPanel = M.require( 'mobile.betaoptin/BetaOptinPanel' ),
|
||||
loader = M.require( 'mobile.startup/rlModuleLoader' ),
|
||||
|
@ -73,6 +74,18 @@
|
|||
return lang ? lang.toLowerCase() : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads tablet modules when the skin is in tablet mode and the
|
||||
* current page is in the main namespace.
|
||||
* @method
|
||||
* @ignore
|
||||
*/
|
||||
function loadTabletModules() {
|
||||
if ( browser.isWideScreen() && page.inNamespace( '' ) ) {
|
||||
mw.loader.using( 'skins.minerva.tablet.scripts' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load image overlay
|
||||
* @method
|
||||
|
@ -243,6 +256,8 @@
|
|||
initModifiedInfo();
|
||||
initRegistrationInfo();
|
||||
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
||||
M.on( 'resize', loadTabletModules );
|
||||
loadTabletModules();
|
||||
} );
|
||||
|
||||
M.define( 'skins.minerva.scripts/overlayManager', overlayManager );
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
),
|
||||
skinData = {
|
||||
el: 'body',
|
||||
tabletModules: [ 'skins.minerva.tablet.scripts' ],
|
||||
page: getCurrentPage(),
|
||||
referencesGateway: ReferencesMobileViewGateway.getSingleton()
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue