diff --git a/src/components/Hyperchat.svelte b/src/components/Hyperchat.svelte index d1277aa..bf3daee 100644 --- a/src/components/Hyperchat.svelte +++ b/src/components/Hyperchat.svelte @@ -817,7 +817,7 @@ {:else} diff --git a/src/scripts/chat-injector.ts b/src/scripts/chat-injector.ts index d5344bc..86d616e 100644 --- a/src/scripts/chat-injector.ts +++ b/src/scripts/chat-injector.ts @@ -134,6 +134,8 @@ const chatLoaded = async (): Promise => { return; } const activatorButton = document.querySelector('.ytcf-launch-button') as HTMLButtonElement; + const activatorText = activatorButton.querySelector('.activator-text') as HTMLSpanElement; + const activatorIcon = activatorButton.querySelector('.activator-icon') as HTMLSpanElement; const popoutButton = document.querySelector('.ytcf-popout-button') as HTMLButtonElement; const settingsButton = document.querySelector('.ytcf-settings-button') as HTMLButtonElement; // eslint-disable-next-line @typescript-eslint/no-misused-promises @@ -142,6 +144,8 @@ const chatLoaded = async (): Promise => { const frame = ytcfilterElement.querySelector('iframe'); const resizeBar = document.querySelector('.ytcf-resize-bar') as HTMLDivElement; if (forceClose || ytcfilterElement.style.display === 'block') { + activatorText.textContent = 'Embed'; + activatorIcon.textContent = 'expand'; ytcfilterElement.style.display = 'none'; resizeBar.style.display = 'none'; ytcfilterElement.style.display = 'none'; @@ -150,6 +154,8 @@ const chatLoaded = async (): Promise => { } return; } + activatorText.textContent = 'Un-Embed'; + activatorIcon.textContent = 'cancel_presentation'; ytcfilterElement.style.display = 'block'; resizeBar.style.display = 'flex'; if (frame && frame.src !== source) {