Merge "Re-fix in-page loading"

This commit is contained in:
jenkins-bot 2015-11-23 17:00:13 +00:00 committed by Gerrit Code Review
commit 5649256ceb

View file

@ -18,8 +18,8 @@
* @singleton
*/
( function () {
var conf, tabMessages, uri, pageExists, viewUri, veEditUri, pageCanLoadVE, init,
support, targetPromise, enable, tempdisable, autodisable, userPrefEnabled,
var conf, tabMessages, uri, pageExists, viewUri, veEditUri, isViewPage, pageCanLoadVE,
init, support, targetPromise, enable, tempdisable, autodisable, userPrefEnabled,
initialWikitext,
active = false,
progressStep = 0,
@ -223,8 +223,9 @@
uri = new mw.Uri();
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 );
pageCanLoadVE = (
( mw.config.get( 'wgIsArticle' ) && !( 'diff' in uri.query ) ) ||
isViewPage ||
mw.config.get( 'wgAction' ) === 'edit' ||
mw.config.get( 'wgAction' ) === 'submit'
);
@ -565,7 +566,7 @@
} );
} );
} );
} else if ( wikitext ) {
} else if ( isViewPage || wikitext ) {
activatePageTarget();
} else {
location.href = veEditUri;