aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-01-17 13:10:33 -0500
committerAjay Ramachandran <[email protected]>2021-01-17 13:10:33 -0500
commitff0dc6e5706ffae19502b192061189c6e0c2199f (patch)
treeca387f05c77f5ddcaafd47a2c14a6bd09272f5bd
parent209e42578f2e95add1782480087289ee0f1207c1 (diff)
downloadSponsorBlock-ff0dc6e5706ffae19502b192061189c6e0c2199f.tar.gz
SponsorBlock-ff0dc6e5706ffae19502b192061189c6e0c2199f.zip
Never move old skip notice
Partially resolves https://github.com/ajayyy/SponsorBlock/issues/505
-rw-r--r--src/components/NoticeComponent.tsx4
-rw-r--r--src/components/SkipNoticeComponent.tsx7
2 files changed, 3 insertions, 8 deletions
diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx
index 9fff3be4..d699c204 100644
--- a/src/components/NoticeComponent.tsx
+++ b/src/components/NoticeComponent.tsx
@@ -71,7 +71,9 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
return (
<table id={"sponsorSkipNotice" + this.idSuffix}
- className={"sponsorSkipObject sponsorSkipNotice" + (this.props.fadeIn ? " sponsorSkipNoticeFadeIn" : "")}
+ className={"sponsorSkipObject sponsorSkipNotice"
+ + (this.props.fadeIn ? " sponsorSkipNoticeFadeIn" : "")
+ + (this.amountOfPreviousNotices > 0 ? " secondSkipNotice" : "")}
style={noticeStyle}
onMouseEnter={() => this.timerMouseEnter()}
onMouseLeave={() => this.timerMouseLeave()}>
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx
index aa75a587..069472b2 100644
--- a/src/components/SkipNoticeComponent.tsx
+++ b/src/components/SkipNoticeComponent.tsx
@@ -91,13 +91,6 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
}
this.idSuffix += this.amountOfPreviousNotices;
- if (this.amountOfPreviousNotices > 0) {
- //another notice exists
-
- const previousNotice = document.getElementsByClassName("sponsorSkipNotice")[0];
- previousNotice.classList.add("secondSkipNotice")
- }
-
// Setup state
this.state = {
noticeTitle,