mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Use mw.Title.isTalkNamespace"
This commit is contained in:
commit
ae037e77ca
|
@ -1107,8 +1107,7 @@ ve.init.mw.DesktopArticleTarget.prototype.setupSkinTabs = function () {
|
|||
if ( this.isViewPage ) {
|
||||
namespaceNumber = mw.config.get( 'wgNamespaceNumber' );
|
||||
namespaceName = mw.config.get( 'wgCanonicalNamespace' );
|
||||
// MWNamespace::isTalk()
|
||||
isTalkNamespace = namespaceNumber > 0 && namespaceNumber % 2 !== 0;
|
||||
isTalkNamespace = mw.Title.isTalkNamespace( namespaceNumber );
|
||||
// Title::getNamespaceKey()
|
||||
namespaceKey = namespaceName.toLowerCase() || 'main';
|
||||
if ( namespaceKey === 'file' ) {
|
||||
|
|
Loading…
Reference in a new issue