Merge "Fix: always show table of contents"
This commit is contained in:
commit
94d0229b74
|
@ -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' ),
|
||||
];
|
||||
|
||||
|
|
|
@ -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' ) {
|
||||
|
|
Loading…
Reference in New Issue