Skip to content

Commit

Permalink
Fix layout for playlists on search page
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Jan 11, 2024
1 parent ffc953d commit 334e7d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/titles/titleRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,12 @@ async function createShowOriginalButton(originalTitleElement: HTMLElement,
buttonElement.classList.add("cbShowOriginal");
if (onMobile()) buttonElement.classList.add("cbMobileButton");

// Playlists and mixes on search page have extra margins that need to be applied to this new element
const originalMarginTop = getComputedStyle(originalTitleElement).marginTop;
if (originalMarginTop) {
buttonElement.style.marginTop = originalMarginTop;
}

buttonElement.classList.add("cbButton");
if (brandingLocation === BrandingLocation.Watch
|| Config.config!.alwaysShowShowOriginalButton) {
Expand Down

0 comments on commit 334e7d8

Please sign in to comment.