Skip to content

Commit

Permalink
un-embed and call it a menu
Browse files Browse the repository at this point in the history
  • Loading branch information
KentoNishi committed May 28, 2024
1 parent e3bdaa4 commit dfc11d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Hyperchat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@
</button>
{:else}
<button use:exioButton on:click={toggleTopBar} class="inline-flex gap-1 items-center">
{topBarVisible ? 'Less' : 'More'}
Menu
<div use:exioIcon class="inline-block" style="color: inherit;">
unfold_{topBarVisible ? 'less' : 'more'}_double
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/YtcFilterButtons.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
<span class="static-logo-text">YtcFilter</span>
</div>
<button use:exioButton class="activator ytcf-launch-button">
<span>Embed</span>
<div use:exioIcon class="shifted-icon top-bar-icon">
<span class="activator-text">Embed</span>
<div use:exioIcon class="shifted-icon top-bar-icon activator-icon">
expand
</div>
</button>
Expand Down
6 changes: 6 additions & 0 deletions src/scripts/chat-injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ const chatLoaded = async (): Promise<void> => {
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
Expand All @@ -142,6 +144,8 @@ const chatLoaded = async (): Promise<void> => {
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';
Expand All @@ -150,6 +154,8 @@ const chatLoaded = async (): Promise<void> => {
}
return;
}
activatorText.textContent = 'Un-Embed';
activatorIcon.textContent = 'cancel_presentation';
ytcfilterElement.style.display = 'block';
resizeBar.style.display = 'flex';
if (frame && frame.src !== source) {
Expand Down

0 comments on commit dfc11d6

Please sign in to comment.