mediawiki-extensions-Visual.../modules/ve-mw/init/targets
Bartosz Dziewoński d687e01208 Do not check for visual editor availability when loading source editor
Follow-up to fefb76eebc. Prior to that
change, the condition for this looked like this:

  // … if on a ?veaction=edit/editsource page
  (
    isViewPage &&
    uri.query.veaction in editModes &&
    (
      uri.query.veaction === 'editsource' ||
      init.isVisualAvailable
    )
  )

In the refactor, the `uri.query.veaction === 'editsource'` check was
lost.

Since that code is pretty messy (probably predating the source editor
and hastily adjusted), instead change the check for `isVisualAvailable`
to just `isAvailable`. If the requested mode turns out to not be
available later, the editor will not load.

Bug: T165146
Change-Id: Idfaf9115dd20cec8f8e044a704b93b07984cdcee
2017-05-16 18:57:56 +02:00
..
ve.init.mw.DesktopArticleTarget.init.js Do not check for visual editor availability when loading source editor 2017-05-16 18:57:56 +02:00
ve.init.mw.DesktopArticleTarget.js DesktopArticleTarget: only destroy notices tool if it exists 2017-04-26 18:03:39 +00:00
ve.init.mw.MobileArticleTarget.js *ArticleTarget: Don't trust oldid in the query string, it lies 2017-03-24 00:30:00 +00:00