jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370109 )

Change subject: Hygiene: The main page check is not necessary
......................................................................


Hygiene: The main page check is not necessary

The main page in the Minerva skin is not editable so this code is
just cruft. T89559 no longer applies.

Change-Id: Ifcd30be0d4e328b056cc7fcfb714c9783b62c913
---
M resources/skins.minerva.editor/init.js
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Pmiazga: Looks good to me, but someone else must approve
  Bmansurov: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/skins.minerva.editor/init.js 
b/resources/skins.minerva.editor/init.js
index 675b94b..c6b5b6d 100644
--- a/resources/skins.minerva.editor/init.js
+++ b/resources/skins.minerva.editor/init.js
@@ -249,8 +249,7 @@
                if ( $caEdit.find( '.edit-page' ).length === 0 ) {
                        $( '.nojs-edit' ).removeClass( 'nojs-edit' );
                        $( '#ca-edit a' ).remove();
-                       // FIXME: unfortunately the main page is special cased.
-                       if ( mw.config.get( 'wgIsMainPage' ) || isNewPage ||
+                       if ( isNewPage ||
                                        ( leadSection && leadSection.text() ) 
|| page.getSections().length === 0 ) {
                                // if lead section is not empty, open editor 
with lead section
                                // In some namespaces (controlled by 
MFNamespacesWithoutCollapsibleSections)
@@ -262,10 +261,8 @@
                        }
                }
 
-               // enable all edit pencils in sub-sections for the article 
namespace except for the main
-               // page, the pencils are unstyled there, see bug T89559
-               // FIXME: Merge this with the line under it after main page 
special handling is killed
-               if ( !mw.config.get( 'wgIsMainPage' ) && 
currentPage.getNamespaceId() === 0 ) {
+               // enable all edit pencils in sub-sections for the article 
namespace
+               if ( currentPage.getNamespaceId() === 0 ) {
                        $( '.in-block>.edit-page' ).show();
                }
                $( '.edit-page' ).on( 'click', function ( ev ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/370109
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifcd30be0d4e328b056cc7fcfb714c9783b62c913
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Pmiazga <pmia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to