mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
NWE: Don't show button to switch to VE if it isn't available
Bug: T146182 Change-Id: I4bd039726ebccfd4351ecc68e6d7662752412d1b
This commit is contained in:
parent
c0cf9c1e75
commit
d0abe11aca
|
@ -149,7 +149,11 @@ ve.init.mw.DesktopWikitextArticleTarget.prototype.setupToolbar = function ( surf
|
||||||
actionGroups[ 1 ].include,
|
actionGroups[ 1 ].include,
|
||||||
[ 'meta', 'settings', 'advancedSettings', 'categories', 'languages' ]
|
[ 'meta', 'settings', 'advancedSettings', 'categories', 'languages' ]
|
||||||
);
|
);
|
||||||
actionGroups[ 2 ].include[ 0 ] = 'editModeVisual';
|
if ( mw.libs.ve.isVisualAvailable ) {
|
||||||
|
actionGroups[ 2 ].include[ 0 ] = 'editModeVisual';
|
||||||
|
} else {
|
||||||
|
actionGroups[ 2 ].include = [];
|
||||||
|
}
|
||||||
this.getActions().setup( actionGroups, surface );
|
this.getActions().setup( actionGroups, surface );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue