From 4f7859895baf3b8d8648fc1946ae7825fa0703c2 Mon Sep 17 00:00:00 2001 From: Krenair Date: Sat, 11 May 2013 22:14:08 +0100 Subject: [PATCH] Don't use VE on non-wikitext pages Bug: 47456 Change-Id: Iae6510f661feedec181fd8697d799353edb5eac8 --- VisualEditor.hooks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 6ecbcd0166..f5503e0a71 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -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' ) ); }