Sticky header: Add user page link to user menu in sticky header
Bug: T292557 Change-Id: Ia72c214ef6384dfeae21556aa4007eb6075f0057
This commit is contained in:
parent
1c3dde072b
commit
c16fa80006
|
@ -75,6 +75,17 @@ function removeNode( node ) {
|
|||
toHTMLElement( node.parentNode ).removeChild( node );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {NodeList} nodes
|
||||
* @param {string} className
|
||||
*/
|
||||
function removeClassFromNodes( nodes, className ) {
|
||||
Array.prototype.forEach.call( nodes, function ( node ) {
|
||||
// eslint-disable-next-line mediawiki/class-doc
|
||||
node.classList.remove( className );
|
||||
} );
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes sticky header icons functional for modern Vector.
|
||||
*
|
||||
|
@ -213,6 +224,10 @@ function makeStickyHeaderFunctional(
|
|||
if ( gadgetLinks ) {
|
||||
gadgetLinks.remove();
|
||||
}
|
||||
removeClassFromNodes(
|
||||
userMenuClone.querySelectorAll( '.user-links-collapsible-item' ),
|
||||
'user-links-collapsible-item'
|
||||
);
|
||||
|
||||
// Prevents user menu from being focusable, T290201
|
||||
var userMenuCheckbox = userMenuClone.querySelector( 'input' );
|
||||
|
|
Loading…
Reference in New Issue