mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Never move old skip notice
Partially resolves https://github.com/ajayyy/SponsorBlock/issues/505
This commit is contained in:
@@ -71,7 +71,9 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<table id={"sponsorSkipNotice" + this.idSuffix}
|
<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}
|
style={noticeStyle}
|
||||||
onMouseEnter={() => this.timerMouseEnter()}
|
onMouseEnter={() => this.timerMouseEnter()}
|
||||||
onMouseLeave={() => this.timerMouseLeave()}>
|
onMouseLeave={() => this.timerMouseLeave()}>
|
||||||
|
|||||||
@@ -91,13 +91,6 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
}
|
}
|
||||||
this.idSuffix += this.amountOfPreviousNotices;
|
this.idSuffix += this.amountOfPreviousNotices;
|
||||||
|
|
||||||
if (this.amountOfPreviousNotices > 0) {
|
|
||||||
//another notice exists
|
|
||||||
|
|
||||||
const previousNotice = document.getElementsByClassName("sponsorSkipNotice")[0];
|
|
||||||
previousNotice.classList.add("secondSkipNotice")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup state
|
// Setup state
|
||||||
this.state = {
|
this.state = {
|
||||||
noticeTitle,
|
noticeTitle,
|
||||||
|
|||||||
Reference in New Issue
Block a user