Merge "Hygiene: The main page check is not necessary"
This commit is contained in:
commit
615350518f
|
@ -249,8 +249,7 @@
|
||||||
if ( $caEdit.find( '.edit-page' ).length === 0 ) {
|
if ( $caEdit.find( '.edit-page' ).length === 0 ) {
|
||||||
$( '.nojs-edit' ).removeClass( 'nojs-edit' );
|
$( '.nojs-edit' ).removeClass( 'nojs-edit' );
|
||||||
$( '#ca-edit a' ).remove();
|
$( '#ca-edit a' ).remove();
|
||||||
// FIXME: unfortunately the main page is special cased.
|
if ( isNewPage ||
|
||||||
if ( mw.config.get( 'wgIsMainPage' ) || isNewPage ||
|
|
||||||
( leadSection && leadSection.text() ) || page.getSections().length === 0 ) {
|
( leadSection && leadSection.text() ) || page.getSections().length === 0 ) {
|
||||||
// if lead section is not empty, open editor with lead section
|
// if lead section is not empty, open editor with lead section
|
||||||
// In some namespaces (controlled by MFNamespacesWithoutCollapsibleSections)
|
// 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
|
// enable all edit pencils in sub-sections for the article namespace
|
||||||
// page, the pencils are unstyled there, see bug T89559
|
if ( currentPage.getNamespaceId() === 0 ) {
|
||||||
// FIXME: Merge this with the line under it after main page special handling is killed
|
|
||||||
if ( !mw.config.get( 'wgIsMainPage' ) && currentPage.getNamespaceId() === 0 ) {
|
|
||||||
$( '.in-block>.edit-page' ).show();
|
$( '.in-block>.edit-page' ).show();
|
||||||
}
|
}
|
||||||
$( '.edit-page' ).on( 'click', function ( ev ) {
|
$( '.edit-page' ).on( 'click', function ( ev ) {
|
||||||
|
|
Loading…
Reference in New Issue