aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-12-24 15:20:16 -0500
committerAjay <[email protected]>2024-12-24 15:20:16 -0500
commit16f24978ffba2abc0b984913907619344365c1bc (patch)
treecd08b12b24675ba6b3dc022498ec07b93fb2e42a /src
parent091d67e6b31f7b026df6d0211622457f41a15a88 (diff)
downloadSponsorBlock-master.tar.gz
SponsorBlock-master.zip
Fix offset with chapters on hover previewHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/js-components/previewBar.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts
index 0a93d9c9..981f05f8 100644
--- a/src/js-components/previewBar.ts
+++ b/src/js-components/previewBar.ts
@@ -152,6 +152,10 @@ class PreviewBar {
// Hide original tooltip if some chapter has been filtered out
originalTooltip.style.display = "none";
noYoutubeChapters = true;
+
+ originalTooltip.classList.add("sponsorTooltipHasYTChapters");
+ } else {
+ originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
}
if (mainSegment === null && secondarySegment === null) {
@@ -163,6 +167,7 @@ class PreviewBar {
this.categoryTooltipContainer.classList.add(TOOLTIP_VISIBLE_CLASS);
if (mainSegment !== null && secondarySegment !== null) {
this.categoryTooltipContainer.classList.add("sponsorTwoTooltips");
+ originalTooltip.classList.remove("sponsorTooltipHasYTChapters");
} else {
this.categoryTooltipContainer.classList.remove("sponsorTwoTooltips");
}