mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Don't use VE on non-wikitext pages"
This commit is contained in:
commit
04f73d268f
|
@ -31,7 +31,9 @@ class VisualEditorHooks {
|
||||||
in_array( $skin->getTitle()->getNamespace(), $wgVisualEditorNamespaces ) ||
|
in_array( $skin->getTitle()->getNamespace(), $wgVisualEditorNamespaces ) ||
|
||||||
// Special page action for an article in the VisualEditor namespace
|
// Special page action for an article in the VisualEditor namespace
|
||||||
in_array( $skin->getRelevantTitle()->getNamespace(), $wgVisualEditorNamespaces )
|
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' ) );
|
$output->addModules( array( 'ext.visualEditor.viewPageTarget' ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue