Skip to content

Commit

Permalink
Fix #65: Refactor category pill tooltip rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxuan010 committed Nov 10, 2024
1 parent 16f4602 commit 8a28dbf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/CategoryPillComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,18 @@ class CategoryPillComponent extends React.Component<CategoryPillProps, CategoryP
this.tooltip.close();
}

const tooltipMount = document.querySelector("#above-the-fold, ytm-slim-owner-renderer") as HTMLElement;
const tooltipMount = document.querySelector("#viewbox_report") as HTMLElement;
if (tooltipMount) {
this.tooltip = new Tooltip({
text: this.getTitleText(),
referenceNode: tooltipMount,
bottomOffset: "0px",
bottomOffset: "unset",
topOffset: "4px",
opacity: 0.95,
displayTriangle: false,
showLogo: false,
showGotIt: false,
prependElement: tooltipMount.firstElementChild as HTMLElement,
prependElement: tooltipMount.childNodes[1] as HTMLElement,
});
}
}
Expand Down

0 comments on commit 8a28dbf

Please sign in to comment.