mediawiki-skins-MinervaNeue/resources/skins.minerva.scripts/setup.js
Volker E 28361446f9 Remove obsolete fallback CSS classes
Introduced in I0f929f2f3b11362

Bug: T244444
Change-Id: I7e45adf0549c35aaa0c8390329e20d205126f616
2020-03-26 17:52:58 -07:00

33 lines
903 B
JavaScript

/**
* This setups the Minerva skin.
* It should run without errors even if MobileFrontend is not installed.
*/
var ms = require( 'mobile.startup' );
function init() {
var permissions = mw.config.get( 'wgMinervaPermissions' ) || {},
// eslint-disable-next-line no-jquery/no-global-selector
$watch = $( '#page-actions-watch' );
if ( permissions.watch && !mw.user.isAnon() ) {
require( './watchstar.js' )( $watch );
}
// Setup Minerva with MobileFrontend
if ( ms && !ms.stub ) {
require( './initMobile.js' )();
} else {
// MOBILEFRONTEND IS NOT INSTALLED.
// setup search for desktop Minerva at mobile resolution without MobileFrontend.
require( './searchSuggestReveal.js' )();
}
mw.hook( 'util.addPortletLink' ).add( require( './addPortletLink.js' ) );
}
init();
module.exports = {
// Version number allows breaking changes to be detected by other extensions
VERSION: 1
};