mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 14:23:53 +00:00
Merge "Tablet code no longer needs to be conditional"
This commit is contained in:
commit
41f45725f9
|
@ -5,7 +5,6 @@
|
|||
skin = M.require( 'mobile.init/skin' ),
|
||||
issues = M.require( 'skins.minerva.scripts/pageIssues' ),
|
||||
downloadPageAction = M.require( 'skins.minerva.scripts/downloadPageAction' ),
|
||||
browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
|
||||
loader = M.require( 'mobile.startup/rlModuleLoader' ),
|
||||
router = require( 'mediawiki.router' ),
|
||||
OverlayManager = M.require( 'mobile.startup/OverlayManager' ),
|
||||
|
@ -93,18 +92,6 @@
|
|||
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() ) {
|
||||
mw.loader.using( 'skins.minerva.tablet.scripts' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an instance of an ImageOverlay. This function assumes that the module
|
||||
* providing the ImageOverlay has been asynchronously loaded.
|
||||
|
@ -368,8 +355,6 @@
|
|||
initModifiedInfo();
|
||||
initRegistrationInfo();
|
||||
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
||||
eventBus.on( 'resize', loadTabletModules );
|
||||
loadTabletModules();
|
||||
appendDownloadButton();
|
||||
initRedlinksCta();
|
||||
initEditLink();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
( function ( M ) {
|
||||
var TableOfContents = M.require( 'mobile.toc/TableOfContents' ),
|
||||
Toggler = M.require( 'mobile.startup' ).Toggler,
|
||||
eventBus = M.require( 'mobile.startup/eventBusSingleton' );
|
||||
var mobile = M.require( 'mobile.startup' ),
|
||||
Toggler = mobile.Toggler,
|
||||
TableOfContents = mobile.toc.TableOfContents,
|
||||
eventBus = mobile.eventBusSingleton;
|
||||
|
||||
/**
|
||||
* Create TableOfContents if the given Page has sections and is not the main page
|
15
skin.json
15
skin.json
|
@ -438,7 +438,8 @@
|
|||
"resources/skins.minerva.scripts/initLogging.js",
|
||||
"resources/skins.minerva.scripts/mobileRedirect.js",
|
||||
"resources/skins.minerva.scripts/search.js",
|
||||
"resources/skins.minerva.scripts/references.js"
|
||||
"resources/skins.minerva.scripts/references.js",
|
||||
"resources/skins.minerva.scripts/toc.js"
|
||||
]
|
||||
},
|
||||
"skins.minerva.scripts.top": {
|
||||
|
@ -573,18 +574,6 @@
|
|||
"scripts": [
|
||||
"resources/skins.minerva.watchstar/init.js"
|
||||
]
|
||||
},
|
||||
"skins.minerva.tablet.scripts": {
|
||||
"targets": [
|
||||
"mobile",
|
||||
"desktop"
|
||||
],
|
||||
"dependencies": [
|
||||
"mobile.toc"
|
||||
],
|
||||
"scripts": [
|
||||
"resources/skins.minerva.tablet.scripts/toc.js"
|
||||
]
|
||||
}
|
||||
},
|
||||
"manifest_version": 1
|
||||
|
|
Loading…
Reference in a new issue