mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Take pageCanLoadVE into account when figuring out whether VE will load in-page or not"
This commit is contained in:
commit
d750417545
|
@ -773,11 +773,13 @@
|
||||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
||||||
userPrefEnabled
|
userPrefEnabled
|
||||||
) {
|
) {
|
||||||
loadVEInPage = mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
loadVEInPage = pageCanLoadVE && (
|
||||||
|
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||||
(
|
(
|
||||||
getLastEditor() !== 'wikitext' &&
|
getLastEditor() !== 'wikitext' &&
|
||||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
||||||
);
|
)
|
||||||
|
);
|
||||||
// Handle section edit link clicks
|
// Handle section edit link clicks
|
||||||
$( '.mw-editsection a' ).on( 'click', function ( e ) {
|
$( '.mw-editsection a' ).on( 'click', function ( e ) {
|
||||||
if ( loadVEInPage ) {
|
if ( loadVEInPage ) {
|
||||||
|
|
Loading…
Reference in a new issue