Skip to content

Commit

Permalink
change label to class
Browse files Browse the repository at this point in the history
  • Loading branch information
hanydd committed Jan 16, 2025
1 parent 10c2a96 commit 9db4114
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions public/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ input::-webkit-inner-spin-button {
}

/* full video labels on thumbnails */
#sponsorThumbnailLabel {
.sponsorThumbnailLabel {
display: none;
position: absolute;
top: 0;
Expand All @@ -791,32 +791,32 @@ input::-webkit-inner-spin-button {
font-size: 10px;
}

#sponsorThumbnailLabel.sponsorThumbnailLabelVisible {
.sponsorThumbnailLabel.sponsorThumbnailLabelVisible {
display: flex;
}

#sponsorThumbnailLabel svg {
.sponsorThumbnailLabel svg {
height: 2em;
fill: var(--category-text-color, #fff);
}

#sponsorThumbnailLabel span {
.sponsorThumbnailLabel span {
display: none;
padding-left: 0.25em;
font-size: 1.5em;
color: var(--category-text-color, #fff);
}

#sponsorThumbnailLabel:hover {
.sponsorThumbnailLabel:hover {
border-radius: 0.25em;
opacity: 1;
}

#sponsorThumbnailLabel:hover span {
.sponsorThumbnailLabel:hover span {
display: inline;
}

.pod-item #sponsorThumbnailLabel {
.pod-item .sponsorThumbnailLabel {
position: relative;
margin: 0 0 0 0.5em;
box-shadow: none;
Expand Down
4 changes: 2 additions & 2 deletions src/thumbnail-utils/thumbnails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function labelThumbnailProcess(
}

async function getOldThumbnailLabel(thumbnail: HTMLElement): Promise<HTMLElement> {
return waitFor(() => thumbnail.querySelector("#sponsorThumbnailLabel"), 50, 5).catch(() => null);
return waitFor(() => thumbnail.querySelector(".sponsorThumbnailLabel"), 50, 5).catch(() => null);
}

async function hideThumbnailLabel(thumbnail: HTMLElement): Promise<void> {
Expand Down Expand Up @@ -118,7 +118,7 @@ async function createOrGetThumbnail(
}

const overlay = document.createElement("div") as HTMLElement;
overlay.id = "sponsorThumbnailLabel";
overlay.classList.add("sponsorThumbnailLabel");
// Disable hover autoplay
overlay.addEventListener("pointerenter", (e) => {
e.stopPropagation();
Expand Down

0 comments on commit 9db4114

Please sign in to comment.