ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing

To reproduce: start editing a page, turn it into a redirect,
cancel editing and go back to view mode. The "Redirect page"
subtitle under the page title should disappear.

Note that #redirectsub is correctly spelled all lowercase,
unlike #contentSub.

This reverts commit 0e1bc7309b
and fixes the code instead.

Change-Id: Ibacd73122dfec63268a77794bc77c4b88876d3ee
This commit is contained in:
Bartosz Dziewoński 2017-03-28 01:29:42 +00:00
parent 0e1bc7309b
commit d905d705ce

View file

@ -1360,6 +1360,7 @@ ve.init.mw.DesktopArticleTarget.prototype.restorePage = function () {
// Remove any VE-added redirectMsg // Remove any VE-added redirectMsg
if ( $( '.mw-body-content > .ve-redirect-header' ).length ) { if ( $( '.mw-body-content > .ve-redirect-header' ).length ) {
$( '.mw-body-content > .ve-redirect-header' ).remove(); $( '.mw-body-content > .ve-redirect-header' ).remove();
$( '#contentSub #redirectsub, #contentSub #redirectsub + br' ).remove();
} }
// Restore any previous redirectMsg/redirectsub // Restore any previous redirectMsg/redirectsub