@@ -3185,18 +3185,13 @@ function copyInstallFromModal(slug, buttonEl) {
31853185 if ( ! codeEl ) return ;
31863186 var command = codeEl . textContent ;
31873187 navigator . clipboard . writeText ( command ) . then ( function ( ) {
3188- if ( ! buttonEl ) return ;
3189- var label = buttonEl . querySelector ( 'span' ) ;
3190- if ( ! label ) return ;
3191- var saved = label . textContent ;
3192- label . textContent = 'Copied!' ;
3193- buttonEl . style . color = '#04844B' ;
3194- buttonEl . style . borderColor = '#04844B' ;
3195- setTimeout ( function ( ) {
3196- label . textContent = saved ;
3197- buttonEl . style . color = '' ;
3198- buttonEl . style . borderColor = '' ;
3199- } , 1500 ) ;
3188+ closeInstallModal ( slug ) ;
3189+ // Show feedback on the main split button
3190+ var actions = document . getElementById ( 'skill-actions-' + slug ) ;
3191+ if ( ! actions ) return ;
3192+ var mainBtn = actions . querySelector ( '.skill-split-main' ) ;
3193+ if ( ! mainBtn ) return ;
3194+ _showSkillCopiedFeedback ( mainBtn ) ;
32003195 } ) . catch ( function ( err ) {
32013196 console . error ( 'Failed to copy install command:' , err ) ;
32023197 } ) ;
@@ -3224,14 +3219,10 @@ function _showSkillCopiedFeedback(buttonEl) {
32243219 if ( ! label ) return ;
32253220 var saved = label . textContent ;
32263221 label . textContent = 'Copied!' ;
3227- mainBtn . style . background = '#04844B' ;
3228- mainBtn . style . color = 'white' ;
3229- mainBtn . style . borderColor = '#04844B' ;
3222+ mainBtn . style . color = '#04844B' ;
32303223 setTimeout ( function ( ) {
32313224 label . textContent = saved ;
3232- mainBtn . style . background = '' ;
32333225 mainBtn . style . color = '' ;
3234- mainBtn . style . borderColor = '' ;
32353226 } , 1500 ) ;
32363227}
32373228
0 commit comments