mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Allow &veaction=editsource to load 2017WTE regardless of user prefs
Bug: T239796 Change-Id: I0391d44d15763980cfb48b2945bac35e5b08e930
This commit is contained in:
parent
d9c7c05e32
commit
c93d4a9695
|
@ -30,12 +30,8 @@
|
|||
const url = new URL( location.href );
|
||||
// Provide the new wikitext editor
|
||||
if (
|
||||
conf.enableWikitext &&
|
||||
(
|
||||
mw.user.options.get( 'visualeditor-newwikitext' ) ||
|
||||
url.searchParams.get( 'veaction' ) === 'editsource'
|
||||
) &&
|
||||
mw.loader.getState( 'ext.visualEditor.mwwikitext' )
|
||||
mw.user.options.get( 'visualeditor-newwikitext' ) ||
|
||||
url.searchParams.get( 'veaction' ) === 'editsource'
|
||||
) {
|
||||
modules.push( 'ext.visualEditor.mwwikitext' );
|
||||
}
|
||||
|
|
|
@ -1351,11 +1351,14 @@
|
|||
init.isWikitextAvailable = (
|
||||
init.isAvailable &&
|
||||
|
||||
// Enabled on site
|
||||
conf.enableWikitext &&
|
||||
// If forced by the URL parameter, skip the checks (T239796)
|
||||
( url.searchParams.get( 'veaction' ) === 'editsource' || (
|
||||
// Enabled on site
|
||||
conf.enableWikitext &&
|
||||
|
||||
// User preference
|
||||
mw.user.options.get( 'visualeditor-newwikitext' ) &&
|
||||
// User preference
|
||||
mw.user.options.get( 'visualeditor-newwikitext' )
|
||||
) ) &&
|
||||
|
||||
// Only on wikitext pages
|
||||
mw.config.get( 'wgPageContentModel' ) === 'wikitext'
|
||||
|
|
Loading…
Reference in a new issue