diff --git a/resources/skins.minerva.scripts/init.js b/resources/skins.minerva.scripts/init.js index 5683f66a0..3918ff2e8 100644 --- a/resources/skins.minerva.scripts/init.js +++ b/resources/skins.minerva.scripts/init.js @@ -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(); diff --git a/resources/skins.minerva.tablet.scripts/toc.js b/resources/skins.minerva.scripts/toc.js similarity index 85% rename from resources/skins.minerva.tablet.scripts/toc.js rename to resources/skins.minerva.scripts/toc.js index bb7423432..eedecf8b9 100644 --- a/resources/skins.minerva.tablet.scripts/toc.js +++ b/resources/skins.minerva.scripts/toc.js @@ -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 diff --git a/skin.json b/skin.json index 81315ca48..65032e87b 100644 --- a/skin.json +++ b/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