mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-01 01:06:31 +00:00
db29aa53bd
This extends the work in Ie29a1eb7746d56f7d8c99b74e5e3c213c30fdcf2 Bug: T171000 Change-Id: Ib125e1bdaace1893804892909c27a9f328445835
32 lines
828 B
JavaScript
32 lines
828 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' )();
|
|
}
|
|
}
|
|
|
|
init();
|
|
|
|
module.exports = {
|
|
// Version number allows breaking changes to be detected by other extensions
|
|
VERSION: 1
|
|
};
|