mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +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' ),
|
skin = M.require( 'mobile.init/skin' ),
|
||||||
issues = M.require( 'skins.minerva.scripts/pageIssues' ),
|
issues = M.require( 'skins.minerva.scripts/pageIssues' ),
|
||||||
downloadPageAction = M.require( 'skins.minerva.scripts/downloadPageAction' ),
|
downloadPageAction = M.require( 'skins.minerva.scripts/downloadPageAction' ),
|
||||||
browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
|
|
||||||
loader = M.require( 'mobile.startup/rlModuleLoader' ),
|
loader = M.require( 'mobile.startup/rlModuleLoader' ),
|
||||||
router = require( 'mediawiki.router' ),
|
router = require( 'mediawiki.router' ),
|
||||||
OverlayManager = M.require( 'mobile.startup/OverlayManager' ),
|
OverlayManager = M.require( 'mobile.startup/OverlayManager' ),
|
||||||
|
@ -93,18 +92,6 @@
|
||||||
return lang ? lang.toLowerCase() : undefined;
|
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
|
* Make an instance of an ImageOverlay. This function assumes that the module
|
||||||
* providing the ImageOverlay has been asynchronously loaded.
|
* providing the ImageOverlay has been asynchronously loaded.
|
||||||
|
@ -368,8 +355,6 @@
|
||||||
initModifiedInfo();
|
initModifiedInfo();
|
||||||
initRegistrationInfo();
|
initRegistrationInfo();
|
||||||
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
initHistoryLink( $( '.last-modifier-tagline a' ) );
|
||||||
eventBus.on( 'resize', loadTabletModules );
|
|
||||||
loadTabletModules();
|
|
||||||
appendDownloadButton();
|
appendDownloadButton();
|
||||||
initRedlinksCta();
|
initRedlinksCta();
|
||||||
initEditLink();
|
initEditLink();
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
( function ( M ) {
|
( function ( M ) {
|
||||||
var TableOfContents = M.require( 'mobile.toc/TableOfContents' ),
|
var mobile = M.require( 'mobile.startup' ),
|
||||||
Toggler = M.require( 'mobile.startup' ).Toggler,
|
Toggler = mobile.Toggler,
|
||||||
eventBus = M.require( 'mobile.startup/eventBusSingleton' );
|
TableOfContents = mobile.toc.TableOfContents,
|
||||||
|
eventBus = mobile.eventBusSingleton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create TableOfContents if the given Page has sections and is not the main page
|
* 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/initLogging.js",
|
||||||
"resources/skins.minerva.scripts/mobileRedirect.js",
|
"resources/skins.minerva.scripts/mobileRedirect.js",
|
||||||
"resources/skins.minerva.scripts/search.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": {
|
"skins.minerva.scripts.top": {
|
||||||
|
@ -573,18 +574,6 @@
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"resources/skins.minerva.watchstar/init.js"
|
"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
|
"manifest_version": 1
|
||||||
|
|
Loading…
Reference in a new issue