File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11export function initRepoPullRequestCommitStatus ( ) {
22 for ( const btn of document . querySelectorAll ( '.commit-status-hide-checks' ) ) {
3+ const panel = btn . closest ( '.commit-status-panel' ) ;
4+ const list = panel . querySelector ( '.commit-status-list' ) ;
35 btn . addEventListener ( 'click' , ( ) => {
4- const panel = btn . closest ( '.commit-status-panel' ) ;
5- const list = panel . querySelector ( '.commit-status-list' ) ;
6- list . style . maxHeight = list . style . maxHeight ? '' : '0px' ;
6+ list . style . maxHeight = list . style . maxHeight ? '' : '0px' ; // toggle
7+ list . style . overflow = 'hidden' ; // hide scrollbar when hiding
78 btn . textContent = btn . getAttribute ( list . style . maxHeight ? 'data-show-all' : 'data-hide-all' ) ;
89 } ) ;
10+ list . addEventListener ( 'animationend' , ( ) => list . style . overflow = '' ) ;
911 }
1012}
You can’t perform that action at this time.
0 commit comments