Merge "Tablet code no longer needs to be conditional"

This commit is contained in:
jenkins-bot 2019-01-15 15:12:42 +00:00 committed by Gerrit Code Review
commit 41f45725f9
3 changed files with 6 additions and 31 deletions

View file

@ -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();

View file

@ -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

View file

@ -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