DesktopArticleTarget.init: only show welcome dialog if page editable

"Welcome to wikipedia, anyone can edit, we welcome all improvements. Start
editing!" is a bit out of place when what you'll see after clicking "start
editing" is "you can't edit this page".

Bug: T138715
Change-Id: I9f655a5f12d4e45644bd01631c2d3131375d8e8f
This commit is contained in:
David Lynch 2017-07-12 10:29:54 -05:00
parent 48a215b9b3
commit a2f8597712

View file

@ -1043,6 +1043,7 @@
welcomeDialogLocalStorageValue = localStorage.getItem( 've-beta-welcome-dialog' );
} catch ( e ) {}
if (
pageCanLoadEditor &&
showWikitextWelcome &&
mw.config.get( 'wgVisualEditorConfig' ).showBetaWelcome &&
[ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 &&