mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Preserve vehidebetadialog URL flag when switching editor mode"
This commit is contained in:
commit
187a5fe7ac
|
@ -1591,6 +1591,9 @@ ve.init.mw.DesktopArticleTarget.prototype.switchToFallbackWikitextEditor = funct
|
|||
if ( oldId && oldId !== mw.config.get( 'wgCurRevisionId' ) ) {
|
||||
uri.extend( { oldid: oldId } );
|
||||
}
|
||||
if ( mw.libs.ve.isWelcomeDialogSuppressed() ) {
|
||||
uri.extend( { vehidebetadialog: 1 } );
|
||||
}
|
||||
location.href = uri.toString();
|
||||
} );
|
||||
} else {
|
||||
|
|
|
@ -1054,14 +1054,25 @@
|
|||
return !(
|
||||
// Disabled in config?
|
||||
!mw.config.get( 'wgVisualEditorConfig' ).showBetaWelcome ||
|
||||
// Disabled for the current request?
|
||||
this.isWelcomeDialogSuppressed() ||
|
||||
// Hidden using preferences, local storage or cookie?
|
||||
checkPreferenceOrStorage( 'visualeditor-hidebetawelcome', 've-beta-welcome-dialog' )
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Check whether the welcome dialog is temporarily disabled.
|
||||
* @return {boolean}
|
||||
*/
|
||||
isWelcomeDialogSuppressed: function () {
|
||||
return !!(
|
||||
// Disabled by calling disableWelcomeDialog()?
|
||||
welcomeDialogDisabled ||
|
||||
// Hidden using URL parameter?
|
||||
'vehidebetadialog' in new mw.Uri().query ||
|
||||
// Check for deprecated hidewelcomedialog parameter (T249954)
|
||||
'hidewelcomedialog' in new mw.Uri().query ||
|
||||
// Hidden using preferences, local storage or cookie?
|
||||
checkPreferenceOrStorage( 'visualeditor-hidebetawelcome', 've-beta-welcome-dialog' )
|
||||
'hidewelcomedialog' in new mw.Uri().query
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue