aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/js-components/skipButtonControlBar.ts
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-01-05 20:49:56 -0500
committerAjay <[email protected]>2022-01-05 20:49:56 -0500
commit8e964b40b308c966a53fa3590499827bb1492ab4 (patch)
tree578aff18844a3a067e84336b544ec2799f6f6e35 /src/js-components/skipButtonControlBar.ts
parenta6a9b7dd8c7a88654909c0ee6a3218738d343504 (diff)
downloadSponsorBlock-8e964b40b308c966a53fa3590499827bb1492ab4.tar.gz
SponsorBlock-8e964b40b308c966a53fa3590499827bb1492ab4.zip
Add vote buttons to pill that open on click
Diffstat (limited to 'src/js-components/skipButtonControlBar.ts')
-rw-r--r--src/js-components/skipButtonControlBar.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts
index 32018307..a27eefd0 100644
--- a/src/js-components/skipButtonControlBar.ts
+++ b/src/js-components/skipButtonControlBar.ts
@@ -3,6 +3,7 @@ import { SponsorTime } from "../types";
import { getSkippingText } from "../utils/categoryUtils";
import Utils from "../utils";
+import { AnimationUtils } from "../utils/animationUtils";
const utils = new Utils();
export interface SkipButtonControlBarProps {
@@ -80,9 +81,9 @@ export class SkipButtonControlBar {
}
if (!this.onMobileYouTube) {
- utils.setupAutoHideAnimation(this.skipIcon, mountingContainer, false, false);
+ AnimationUtils.setupAutoHideAnimation(this.skipIcon, mountingContainer, false, false);
} else {
- const { hide, show } = utils.setupCustomHideAnimation(this.skipIcon, mountingContainer, false, false);
+ const { hide, show } = AnimationUtils.setupCustomHideAnimation(this.skipIcon, mountingContainer, false, false);
this.hideButton = hide;
this.showButton = show;
}
@@ -104,7 +105,7 @@ export class SkipButtonControlBar {
this.refreshText();
this.textContainer?.classList?.remove("hidden");
- utils.disableAutoHideAnimation(this.skipIcon);
+ AnimationUtils.disableAutoHideAnimation(this.skipIcon);
this.startTimer();
}
@@ -160,7 +161,7 @@ export class SkipButtonControlBar {
this.getChapterPrefix()?.classList?.add("hidden");
- utils.enableAutoHideAnimation(this.skipIcon);
+ AnimationUtils.enableAutoHideAnimation(this.skipIcon);
if (this.onMobileYouTube) {
this.hideButton();
}