diff --git a/extension.json b/extension.json index 063e2bff42..4884d6fab0 100644 --- a/extension.json +++ b/extension.json @@ -589,13 +589,15 @@ "newsectionsummary", "pagecategories", "parentheses", + "redirectto", "tooltip-minoredit", "tooltip-watch", "visualeditor-autosave-not-recovered-text", "visualeditor-autosave-not-recovered-title", "visualeditor-autosave-recovered-text", "visualeditor-autosave-recovered-title", - "visualeditor-diff-no-changes" + "visualeditor-diff-no-changes", + "visualeditor-redirect-description" ], "targets": [ "desktop", @@ -1686,8 +1688,6 @@ "mediawiki.action.view.redirectPage" ], "messages": [ - "redirectto", - "visualeditor-advancedsettings-tool", "visualeditor-categories-tool", "visualeditor-dialog-meta-advancedsettings-label", @@ -1752,7 +1752,6 @@ "visualeditor-dialogbutton-meta-tooltip", "visualeditor-languages-tool", "visualeditor-meta-tool", - "visualeditor-redirect-description", "visualeditor-settings-tool", "visualeditor-templatesused-tool" ], diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 85c838c687..b60fbd493a 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1654,106 +1654,6 @@ ve.init.mw.DesktopArticleTarget.prototype.resetDocumentOpacity = function () { this.getSurface().getView().getDocument().getDocumentNode().$element.css( 'opacity', 1 ); }; -/** - * Return DOM for the redirect page subtitle (#redirectsub). - * - * @return {jQuery} - */ -ve.init.mw.DesktopArticleTarget.prototype.buildRedirectSub = function () { - // Page subtitle - // Compare: Article::view() - return $( '' ) - .attr( 'id', 'redirectsub' ) - .append( mw.message( 'redirectpagesub' ).parseDom() ); -}; - -/** - * Return DOM for the redirect page content header (.redirectMsg). - * - * @param {string} title Redirect target - * @return {jQuery} - */ -ve.init.mw.DesktopArticleTarget.prototype.buildRedirectMsg = function ( title ) { - var target = this, - $link; - - $link = $( '' ) - .attr( 'title', mw.msg( 'visualeditor-redirect-description', title ) ) - .text( title ); - ve.init.platform.linkCache.styleElement( title, $link ); - - // Page content header - // Compare: Article::getRedirectHeaderHtml() - return $( '
' ) - .addClass( 'redirectMsg' ) - // We need to be able to tell apart the real one and our fake one - .addClass( 've-redirect-header' ) - // Hack: This is normally inside #mw-content-text, but we insert it before, so we need this. - .addClass( 'mw-content-' + $( 'html' ).attr( 'dir' ) ) - .append( - $( '

' ).text( mw.msg( 'redirectto' ) ), - $( '