Fix: always show table of contents

Do not conditionally render the table of contents. Note: the underlying
condition, MFTOC, appears to still be used by MobileFormatter so it was
unchanged.

Bug: T189699
Change-Id: I7088ccad75c2a8504bf435418d7dd62238b2135d
This commit is contained in:
Stephen Niedzielski 2018-03-28 13:36:17 -05:00
parent 180b55d13b
commit e8b4559f5b
2 changed files with 13 additions and 18 deletions

View File

@ -1285,8 +1285,6 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$vars = [
'wgMinervaDownloadNamespaces' => $this->getConfig()->get( 'MinervaDownloadNamespaces' ),
'wgMinervaMenuData' => $this->getMenuData(),
// Expose for skins.minerva.tablet.scripts
'wgMinervaTocEnabled' => $out->getProperty( 'MFTOC' ),
'wgMFDescription' => $out->getProperty( 'wgMFDescription' ),
];

View File

@ -12,10 +12,8 @@
function init( page ) {
var toc,
sections = page.getSections(),
$toc = $( '#toc' ),
enableToc = mw.config.get( 'wgMinervaTocEnabled' );
$toc = $( '#toc' );
if ( enableToc ) {
toc = new TableOfContents( {
sections: sections
} );
@ -31,7 +29,6 @@
toc.appendTo( page.getLeadSectionElement() );
}
}
}
// add a ToC only for "view" action (user is reading a page)
if ( mw.config.get( 'wgAction' ) === 'view' ) {