mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Re-fix in-page loading
Probably broken by Ie808bcaa Partially reverts Icad04dac, hopefully without any regressions Change-Id: I4589bde7eac58b54027a6b9dbe6ecddf79780599
This commit is contained in:
parent
360cdacd4b
commit
a0462d69d4
|
@ -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'
|
||||
);
|
||||
|
@ -562,7 +563,7 @@
|
|||
} );
|
||||
} );
|
||||
} );
|
||||
} else if ( wikitext ) {
|
||||
} else if ( isViewPage || wikitext ) {
|
||||
activatePageTarget();
|
||||
} else {
|
||||
location.href = veEditUri;
|
||||
|
|
Loading…
Reference in a new issue