DesktopArticleTarget.init: Don't load on special pages with action=submit in the URL

Bug: T168533
Bug: T176022
Change-Id: Ifb7b9cca21423684a901dccabab23fb64e576102
This commit is contained in:
Bartosz Dziewoński 2018-11-02 17:54:01 +01:00
parent 74a744327e
commit 1aae17c7a5

View file

@ -507,15 +507,8 @@
pageExists = !!mw.config.get( 'wgRelevantArticleId' );
viewUri = new mw.Uri( mw.util.getUrl( mw.config.get( 'wgRelevantPageName' ) ) );
isViewPage = mw.config.get( 'wgIsArticle' ) && !( 'diff' in uri.query );
pageCanLoadEditor = (
isViewPage ||
mw.config.get( 'wgAction' ) === 'edit' ||
mw.config.get( 'wgAction' ) === 'submit'
);
isEditPage = (
uri.query.action === 'edit' ||
uri.query.action === 'submit'
);
isEditPage = mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit';
pageCanLoadEditor = isViewPage || isEditPage;
// Cast "0" (T89513)
enable = !!+mw.user.options.get( 'visualeditor-enable' );