mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +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 (
|
||||
conf.singleEditTab &&
|
||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'multi-tab' &&
|
||||
userPrefEnabled &&
|
||||
pageCanLoadVE && (
|
||||
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||
(
|
||||
getLastEditor() !== 'wikitext' &&
|
||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
||||
)
|
||||
)
|
||||
userPrefEnabled
|
||||
) {
|
||||
// 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();
|
||||
} );
|
||||
if (
|
||||
pageCanLoadVE && (
|
||||
mw.user.options.get( 'visualeditor-tabs' ) === 'prefer-ve' ||
|
||||
(
|
||||
getLastEditor() !== 'wikitext' &&
|
||||
mw.user.options.get( 'visualeditor-tabs' ) !== 'prefer-wt'
|
||||
)
|
||||
)
|
||||
) {
|
||||
// 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 ) {
|
||||
init.setupSkin();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue