mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-01 01:06:31 +00:00
Disable download button in all namespaces except main
The MinervaDownloadIcon config option is replaced with a more specific wgMinervaDownloadNamespaces config option. If the list is empty then the download button will not be shown. Since the download icon is enabled everywhere in production now this is good as it means Minerva reflects the production value. Bug: T181152 Change-Id: Id78c1de9e8e9013530106bc0d45d3cf0297897b5
This commit is contained in:
parent
9c987a7c72
commit
eaa4dae5af
|
@ -1273,7 +1273,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
$out = $this->getOutput();
|
||||
|
||||
$vars = [
|
||||
'wgMinervaDownloadIcon' => $this->getConfig()->get( 'MinervaDownloadIcon' ),
|
||||
'wgMinervaDownloadNamespaces' => $this->getConfig()->get( 'MinervaDownloadNamespaces' ),
|
||||
'wgMinervaMenuData' => $this->getMenuData(),
|
||||
// Expose for skins.minerva.tablet.scripts
|
||||
'wgMinervaTocEnabled' => $out->getProperty( 'MFTOC' ),
|
||||
|
|
|
@ -229,7 +229,10 @@
|
|||
loadTabletModules();
|
||||
|
||||
if (
|
||||
config.get( 'wgMinervaDownloadIcon' ) &&
|
||||
// Download button is restricted to certain namespaces T181152.
|
||||
// Defaults to 0, in case cached JS has been served.
|
||||
config.get( 'wgMinervaDownloadNamespaces', [ 0 ] )
|
||||
.indexOf( config.get( 'wgNamespaceNumber' ) ) > -1 &&
|
||||
!page.isMainPage() &&
|
||||
// The iOS print dialog does not provide pdf functionality (see T177215)
|
||||
!browser.isIos() &&
|
||||
|
|
Loading…
Reference in a new issue