Skip to content

Commit

Permalink
Merge pull request #222 from VampireChicken12/dev
Browse files Browse the repository at this point in the history
fix(feature menu): being hidden when player is maximized
  • Loading branch information
VampireChicken12 authored Dec 31, 2023
2 parents 03262a1 + 7365b64 commit 3d2f488
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/featureMenu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function createFeatureMenu() {
elementId: "yte-feature-menu",
elementType: "div",
styles: {
display: "none"
display: "none",
zIndex: "2050"
}
});
// Create the feature menu panel
Expand Down
4 changes: 4 additions & 0 deletions src/features/maximizePlayerButton/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export function maximizePlayer() {
if (!controlsElement) return;
const sizeElement = document.querySelector("button.ytp-button.ytp-size-button");
if (!sizeElement) return;
const featureMenu = document.querySelector<HTMLDivElement>("#yte-feature-menu");
if (!featureMenu) return;
const {
childNodes: [svgElement]
} = sizeElement;
Expand Down Expand Up @@ -121,6 +123,7 @@ export function maximizePlayer() {
videoElement.classList.remove("maximized_video");
videoContainer.classList.remove("maximized_video_container");
controlsElement.classList.remove("maximized_controls");
featureMenu.style.bottom = "";
} else {
// sizeElement.click();

Expand All @@ -141,5 +144,6 @@ export function maximizePlayer() {
videoElement.classList.add("maximized_video");
videoContainer.classList.add("maximized_video_container");
controlsElement.classList.add("maximized_controls");
featureMenu.style.bottom = "-14px";
}
}

0 comments on commit 3d2f488

Please sign in to comment.