From 645eb8e5434d632283292b09d31f0cb53a7a3340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 28 Mar 2017 19:47:51 +0200 Subject: [PATCH] Don't use '#content #firstHeading', unnecessarily specific Simply '#firstHeading' does fine. Change-Id: I7c72496f0d58b86582bd33c018b618e1b75f2c7a --- modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js | 2 +- modules/ve-mw/init/ve.init.mw.ArticleTarget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 4645229507..b846478203 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -1452,7 +1452,7 @@ ve.init.mw.DesktopArticleTarget.prototype.replacePageContent = function ( mw.hook( 'wikipage.content' ).fire( this.$editableContent.empty().append( $content ) ); if ( displayTitle ) { - $( '#content #firstHeading' ).html( displayTitle ); + $( '#firstHeading' ).html( displayTitle ); } $categories = $( $.parseHTML( categoriesHtml ) ); diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js index b5f5f47c64..55583addc4 100644 --- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js +++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js @@ -343,7 +343,7 @@ ve.init.mw.ArticleTarget.prototype.loadSuccess = function ( response ) { this.checkboxesByName = {}; this.$otherFields = $( [] ); if ( [ 'edit', 'submit' ].indexOf( mw.util.getParamValue( 'action' ) ) !== -1 ) { - $( '#content #firstHeading' ).text( + $( '#firstHeading' ).text( mw.Title.newFromText( mw.config.get( 'wgPageName' ) ).getPrefixedText() ); }