mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Fix up "Simplify some SET logic"
By 'simplifying', I broke stuff.
This reverts commit b7227f96fe
.
Change-Id: I46fdcf336f556680fa72df0893447b6850cc4b1d
This commit is contained in:
parent
b7227f96fe
commit
39af893c75
|
@ -773,25 +773,28 @@
|
||||||
if (
|
if (
|
||||||
conf.singleEditTab &&
|
conf.singleEditTab &&
|
||||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
||||||
userPrefEnabled &&
|
userPrefEnabled
|
||||||
pageCanLoadVE && (
|
|
||||||
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
|
||||||
(
|
|
||||||
getLastEditor() !== 'wikitext' &&
|
|
||||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
// Handle section edit link clicks
|
if (
|
||||||
$( '.mw-editsection a' ).on( 'click', function ( e ) {
|
pageCanLoadVE && (
|
||||||
init.onEditSectionLinkClick( e );
|
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||||
} );
|
(
|
||||||
// Allow instant switching to edit mode, without refresh
|
getLastEditor() !== 'wikitext' &&
|
||||||
$( '#ca-edit' ).on( 'click', function ( e ) {
|
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
||||||
trackActivateStart( { type: 'page', mechanism: 'click' } );
|
)
|
||||||
activateTarget();
|
)
|
||||||
e.preventDefault();
|
) {
|
||||||
} );
|
// Handle section edit link clicks
|
||||||
|
$( '.mw-editsection a' ).on( 'click', function ( e ) {
|
||||||
|
init.onEditSectionLinkClick( e );
|
||||||
|
} );
|
||||||
|
// Allow instant switching to edit mode, without refresh
|
||||||
|
$( '#ca-edit' ).on( 'click', function ( e ) {
|
||||||
|
trackActivateStart( { type: 'page', mechanism: 'click' } );
|
||||||
|
activateTarget();
|
||||||
|
e.preventDefault();
|
||||||
|
} );
|
||||||
|
}
|
||||||
} else if ( userPrefEnabled ) {
|
} else if ( userPrefEnabled ) {
|
||||||
init.setupSkin();
|
init.setupSkin();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue