mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-27 23:50:30 +00:00
Merge "Get namespace ids from wgNamespaceIds"
This commit is contained in:
commit
83c0b7d907
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
const PageHTMLParser = require( 'mobile.startup' ).PageHTMLParser;
|
const PageHTMLParser = require( 'mobile.startup' ).PageHTMLParser;
|
||||||
const KEYWORD_ALL_SECTIONS = 'all';
|
const KEYWORD_ALL_SECTIONS = 'all';
|
||||||
const NS_MAIN = 0;
|
const namespaceIds = mw.config.get( 'wgNamespaceIds' );
|
||||||
const NS_CATEGORY = 14;
|
const NS_MAIN = namespaceIds[ '' ];
|
||||||
|
const NS_CATEGORY = namespaceIds.category;
|
||||||
const CURRENT_NS = mw.config.get( 'wgNamespaceNumber' );
|
const CURRENT_NS = mw.config.get( 'wgNamespaceNumber' );
|
||||||
const features = mw.config.get( 'wgMinervaFeatures', {} );
|
const features = mw.config.get( 'wgMinervaFeatures', {} );
|
||||||
const pageIssuesParser = require( './parser.js' );
|
const pageIssuesParser = require( './parser.js' );
|
||||||
|
@ -121,7 +122,7 @@ function initPageIssues( overlayManager, pageHTMLParser ) {
|
||||||
const allIssues = {};
|
const allIssues = {};
|
||||||
const $lead = pageHTMLParser.getLeadSectionElement();
|
const $lead = pageHTMLParser.getLeadSectionElement();
|
||||||
const issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || !$lead;
|
const issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || !$lead;
|
||||||
const inline = newTreatmentEnabled && CURRENT_NS === 0;
|
const inline = newTreatmentEnabled && CURRENT_NS === NS_MAIN;
|
||||||
|
|
||||||
// set A-B test class.
|
// set A-B test class.
|
||||||
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
|
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
const Overlay = require( 'mobile.startup' ).Overlay;
|
const Overlay = require( 'mobile.startup' ).Overlay;
|
||||||
const IssueList = require( './IssueList.js' );
|
const IssueList = require( './IssueList.js' );
|
||||||
const KEYWORD_ALL_SECTIONS = 'all';
|
const KEYWORD_ALL_SECTIONS = 'all';
|
||||||
const NS_MAIN = 0;
|
const namespaceIds = mw.config.get( 'wgNamespaceIds' );
|
||||||
const NS_CATEGORY = 14;
|
const NS_MAIN = namespaceIds[ '' ];
|
||||||
|
const NS_CATEGORY = namespaceIds.category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overlay for displaying page issues
|
* Overlay for displaying page issues
|
||||||
|
|
Loading…
Reference in a new issue