https://bugzilla.wikimedia.org/show_bug.cgi?id=38154

       Web browser: ---
             Bug #: 38154
           Summary: VisualEditor only works with Vector skin
           Product: MediaWiki extensions
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: VisualEditor
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: b...@mzmcbride.com
                CC: i...@wikia-inc.com, jforres...@wikimedia.org,
                    rm...@wikimedia.org, roan.katt...@gmail.com,
                    tpars...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---


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;
    }
---

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to