@@ -134,6 +134,8 @@ const chatLoaded = async (): Promise<void> => {
134134 return ;
135135 }
136136 const activatorButton = document . querySelector ( '.ytcf-launch-button' ) as HTMLButtonElement ;
137+ const activatorText = activatorButton . querySelector ( '.activator-text' ) as HTMLSpanElement ;
138+ const activatorIcon = activatorButton . querySelector ( '.activator-icon' ) as HTMLSpanElement ;
137139 const popoutButton = document . querySelector ( '.ytcf-popout-button' ) as HTMLButtonElement ;
138140 const settingsButton = document . querySelector ( '.ytcf-settings-button' ) as HTMLButtonElement ;
139141 // eslint-disable-next-line @typescript-eslint/no-misused-promises
@@ -142,6 +144,8 @@ const chatLoaded = async (): Promise<void> => {
142144 const frame = ytcfilterElement . querySelector ( 'iframe' ) ;
143145 const resizeBar = document . querySelector ( '.ytcf-resize-bar' ) as HTMLDivElement ;
144146 if ( forceClose || ytcfilterElement . style . display === 'block' ) {
147+ activatorText . textContent = 'Embed' ;
148+ activatorIcon . textContent = 'expand' ;
145149 ytcfilterElement . style . display = 'none' ;
146150 resizeBar . style . display = 'none' ;
147151 ytcfilterElement . style . display = 'none' ;
@@ -150,6 +154,8 @@ const chatLoaded = async (): Promise<void> => {
150154 }
151155 return ;
152156 }
157+ activatorText . textContent = 'Un-Embed' ;
158+ activatorIcon . textContent = 'cancel_presentation' ;
153159 ytcfilterElement . style . display = 'block' ;
154160 resizeBar . style . display = 'flex' ;
155161 if ( frame && frame . src !== source ) {
0 commit comments