The VisualEditor extension currently only works with the Vector skin. It should work with other skins such as Monobook.
From [mediawiki/extensions/VisualEditor.git] / VisualEditor.hooks.php (https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/VisualEditor.git;a=blob;f=VisualEditor.hooks.php;h=e43fef59dd678ba5309f2335829dd6fe1e041a2d;hb=4fea35acd451c939a522ab7a4d7bd13e4ac95e76):
class VisualEditorHooks {
/**
- Adds VisualEditor JS to the output if in the correct namespace. *
- This is attached to the MediaWiki 'BeforePageDisplay' hook. *
- @param $output OutputPage
- @param $skin Skin
*/
public static function onBeforePageDisplay( &$output, &$skin ) {
global $wgTitle; if ( // Vector skin supported for now. $skin->getSkinName() === 'vector' && ( // Article in the VisualEditor namespace $wgTitle->getNamespace() === NS_VISUALEDITOR || // Special page action for an article in the VisualEditor namespace $skin->getRelevantTitle()->getNamespace() === NS_VISUALEDITOR ) ) { $output->addModules( array( 'ext.visualEditor.editPageInit' ) ); } return true;
}
Version: unspecified
Severity: enhancement