Remove some useless code trying to show things that are always visible
* Page edit action (#ca-edit) I guess it became always visible when no-JS editing was implemented? * User page creation CTA (.edit-link) I'm making it always visible in Ie2fc6d43ebc03626517eec21bf4738dca05152d0 (which also makes it available for no-JS editing). * Section edit links for nested sub-sections (.in-block > .edit-page) No idea about these, but they are clearly always shown (even in non-article namespaces). Depends-On: Ie2fc6d43ebc03626517eec21bf4738dca05152d0 Change-Id: I226cb1fd1e716078a4a34ed8349d5304428964cf
This commit is contained in:
parent
9515660868
commit
ffa4d0e848
|
@ -95,9 +95,7 @@
|
|||
function updateEditPageButton( enabled ) {
|
||||
$caEdit
|
||||
.addClass( enabled ? enabledClass : disabledClass )
|
||||
.removeClass( enabled ? disabledClass : enabledClass )
|
||||
// TODO: can hidden be removed from the default state?
|
||||
.removeClass( 'hidden' );
|
||||
.removeClass( enabled ? disabledClass : enabledClass );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -271,8 +269,6 @@
|
|||
}
|
||||
} );
|
||||
updateEditPageButton( true );
|
||||
// reveal edit links on user pages
|
||||
page.$( '.edit-link' ).removeClass( 'hidden' );
|
||||
currentPage.getRedLinks().on( 'click', function ( ev ) {
|
||||
var drawerOptions = {
|
||||
progressiveButton: new Button( {
|
||||
|
@ -313,11 +309,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// enable all edit pencils in sub-sections for the article namespace
|
||||
if ( currentPage.getNamespaceId() === 0 ) {
|
||||
$( '.in-block>.edit-page' ).show();
|
||||
}
|
||||
|
||||
if ( !router.getPath() && ( mw.util.getParamValue( 'veaction' ) || mw.util.getParamValue( 'action' ) === 'edit' ) ) {
|
||||
if ( mw.util.getParamValue( 'veaction' ) === 'edit' ) {
|
||||
editorOverride = 'VisualEditor';
|
||||
|
|
Loading…
Reference in New Issue