Fix up "Simplify some SET logic"

By 'simplifying', I broke stuff.

This reverts commit b7227f96fe.

Change-Id: I46fdcf336f556680fa72df0893447b6850cc4b1d
This commit is contained in:
Alex Monk 2015-12-15 02:44:10 +00:00 committed by Alex Monk
parent b7227f96fe
commit 39af893c75

View file

@ -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();
}