mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Re-fix in-page loading"
This commit is contained in:
commit
5649256ceb
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue