mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-11 05:46:09 +00:00
02ebb84ea0
Note, this removes a visibility animation. Bug: T264376 Change-Id: I3589c615a8739e5ece6538acf42ff1292be84d71
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
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' ).init( $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' ) );
|
|
|
|
// This hot fix should be reviewed and possibly removed circa January 2021.
|
|
// It's assumed that Apple will prioritize fixing this bug in one of its next releases.
|
|
// See T264376.
|
|
if ( navigator.userAgent.match( /OS 14_0/ ) ) {
|
|
document.body.classList.add( 'hotfix-T264376' );
|
|
}
|
|
}
|
|
|
|
init();
|
|
|
|
module.exports = {
|
|
// Version number allows breaking changes to be detected by other extensions
|
|
VERSION: 1
|
|
};
|