aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/ChapterVoteComponent.tsx4
-rw-r--r--src/components/NoticeComponent.tsx6
-rw-r--r--src/js-components/skipButtonControlBar.ts20
-rw-r--r--src/utils/animationUtils.ts10
4 files changed, 20 insertions, 20 deletions
diff --git a/src/components/ChapterVoteComponent.tsx b/src/components/ChapterVoteComponent.tsx
index 9ee75727..d50878a6 100644
--- a/src/components/ChapterVoteComponent.tsx
+++ b/src/components/ChapterVoteComponent.tsx
@@ -44,7 +44,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
<>
{/* Upvote Button */}
<button id={"sponsorTimesDownvoteButtonsContainerUpvoteChapter"}
- className={"playerButton sbPlayerUpvote ytp-button " + (!this.state.show ? "hidden" : "")}
+ className={"playerButton sbPlayerUpvote ytp-button " + (!this.state.show ? "sbhidden" : "")}
draggable="false"
title={chrome.i18n.getMessage("upvoteButtonInfo")}
onClick={(e) => this.vote(e, 1)}>
@@ -55,7 +55,7 @@ class ChapterVoteComponent extends React.Component<ChapterVoteProps, ChapterVote
{/* Downvote Button */}
<button id={"sponsorTimesDownvoteButtonsContainerDownvoteChapter"}
- className={"playerButton sbPlayerDownvote ytp-button " + (!this.state.show ? "hidden" : "")}
+ className={"playerButton sbPlayerDownvote ytp-button " + (!this.state.show ? "sbhidden" : "")}
draggable="false"
title={chrome.i18n.getMessage("reportButtonInfo")}
onClick={(e) => {
diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx
index 2f404ba1..0e3526d1 100644
--- a/src/components/NoticeComponent.tsx
+++ b/src/components/NoticeComponent.tsx
@@ -196,21 +196,21 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
<span
id={"skipNoticeTimerText" + this.idSuffix}
key="skipNoticeTimerText"
- className={this.state.countdownMode !== CountdownMode.Timer ? "hidden" : ""} >
+ className={this.state.countdownMode !== CountdownMode.Timer ? "sbhidden" : ""} >
{chrome.i18n.getMessage("NoticeTimeAfterSkip").replace("{seconds}", this.state.countdownTime.toString())}
</span>
),(
<img
id={"skipNoticeTimerPaused" + this.idSuffix}
key="skipNoticeTimerPaused"
- className={this.state.countdownMode !== CountdownMode.Paused ? "hidden" : ""}
+ className={this.state.countdownMode !== CountdownMode.Paused ? "sbhidden" : ""}
src={chrome.runtime.getURL("icons/pause.svg")}
alt={chrome.i18n.getMessage("paused")} />
),(
<img
id={"skipNoticeTimerStopped" + this.idSuffix}
key="skipNoticeTimerStopped"
- className={this.state.countdownMode !== CountdownMode.Stopped ? "hidden" : ""}
+ className={this.state.countdownMode !== CountdownMode.Stopped ? "sbhidden" : ""}
src={chrome.runtime.getURL("icons/stop.svg")}
alt={chrome.i18n.getMessage("manualPaused")} />
)];
diff --git a/src/js-components/skipButtonControlBar.ts b/src/js-components/skipButtonControlBar.ts
index 2a93c49c..a4cf31a5 100644
--- a/src/js-components/skipButtonControlBar.ts
+++ b/src/js-components/skipButtonControlBar.ts
@@ -41,7 +41,7 @@ export class SkipButtonControlBar {
this.container = document.createElement("div");
this.container.classList.add("skipButtonControlBarContainer");
- this.container.classList.add("hidden");
+ this.container.classList.add("sbhidden");
if (this.onMobileYouTube) this.container.classList.add("mobile");
this.skipIcon = document.createElement("img");
@@ -103,7 +103,7 @@ export class SkipButtonControlBar {
this.refreshText();
this.container?.classList?.remove("textDisabled");
- this.textContainer?.classList?.remove("hidden");
+ this.textContainer?.classList?.remove("sbhidden");
AnimationUtils.disableAutoHideAnimation(this.skipIcon);
this.startTimer();
@@ -111,8 +111,8 @@ export class SkipButtonControlBar {
refreshText(): void {
if (this.segment) {
- this.chapterText?.classList?.add("hidden");
- this.container.classList.remove("hidden");
+ this.chapterText?.classList?.add("sbhidden");
+ this.container.classList.remove("sbhidden");
this.textContainer.innerText = this.getTitle();
this.skipIcon.setAttribute("title", this.getTitle());
}
@@ -134,10 +134,10 @@ export class SkipButtonControlBar {
}
disable(): void {
- this.container.classList.add("hidden");
+ this.container.classList.add("sbhidden");
- this.chapterText?.classList?.remove("hidden");
- this.getChapterPrefix()?.classList?.remove("hidden");
+ this.chapterText?.classList?.remove("sbhidden");
+ this.getChapterPrefix()?.classList?.remove("sbhidden");
this.enabled = false;
}
@@ -160,10 +160,10 @@ export class SkipButtonControlBar {
}
this.container.classList.add("textDisabled");
- this.textContainer?.classList?.add("hidden");
- this.chapterText?.classList?.remove("hidden");
+ this.textContainer?.classList?.add("sbhidden");
+ this.chapterText?.classList?.remove("sbhidden");
- this.getChapterPrefix()?.classList?.add("hidden");
+ this.getChapterPrefix()?.classList?.add("sbhidden");
AnimationUtils.enableAutoHideAnimation(this.skipIcon);
if (this.onMobileYouTube) {
diff --git a/src/utils/animationUtils.ts b/src/utils/animationUtils.ts
index d7302c48..08a59ce0 100644
--- a/src/utils/animationUtils.ts
+++ b/src/utils/animationUtils.ts
@@ -27,7 +27,7 @@ function applyLoadingAnimation(element: HTMLElement, time: number, callback?: ()
function setupCustomHideAnimation(element: Element, container: Element, enabled = true, rightSlide = true): { hide: () => void; show: () => void } {
if (enabled) element.classList.add("autoHiding");
- element.classList.add("hidden");
+ element.classList.add("sbhidden");
element.classList.add("animationDone");
if (!rightSlide) element.classList.add("autoHideLeft");
@@ -37,7 +37,7 @@ function setupCustomHideAnimation(element: Element, container: Element, enabled
hide: () => {
mouseEntered = false;
if (element.classList.contains("autoHiding")) {
- element.classList.add("hidden");
+ element.classList.add("sbhidden");
}
},
show: () => {
@@ -46,7 +46,7 @@ function setupCustomHideAnimation(element: Element, container: Element, enabled
// Wait for next event loop
setTimeout(() => {
- if (mouseEntered) element.classList.remove("hidden")
+ if (mouseEntered) element.classList.remove("sbhidden")
}, 10);
}
};
@@ -61,12 +61,12 @@ function setupAutoHideAnimation(element: Element, container: Element, enabled =
function enableAutoHideAnimation(element: Element): void {
element.classList.add("autoHiding");
- element.classList.add("hidden");
+ element.classList.add("sbhidden");
}
function disableAutoHideAnimation(element: Element): void {
element.classList.remove("autoHiding");
- element.classList.remove("hidden");
+ element.classList.remove("sbhidden");
}
export const AnimationUtils = {