mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Don't use VE on non-wikitext pages
Bug: 47456 Change-Id: Iae6510f661feedec181fd8697d799353edb5eac8
This commit is contained in:
parent
da4ddbc4d9
commit
4f7859895b
|
@ -31,7 +31,9 @@ class VisualEditorHooks {
|
|||
in_array( $skin->getTitle()->getNamespace(), $wgVisualEditorNamespaces ) ||
|
||||
// Special page action for an article in the VisualEditor namespace
|
||||
in_array( $skin->getRelevantTitle()->getNamespace(), $wgVisualEditorNamespaces )
|
||||
)
|
||||
) &&
|
||||
// Only use VisualEditor if the page is wikitext, not CSS/JS
|
||||
$skin->getTitle()->getContentModel() === CONTENT_MODEL_WIKITEXT
|
||||
) {
|
||||
$output->addModules( array( 'ext.visualEditor.viewPageTarget' ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue