diff options
author | Ajay Ramachandran <[email protected]> | 2021-08-17 21:05:53 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2021-08-17 21:05:53 -0400 |
commit | ffc8f0b6a08a9e215abd87e3fe90610185183599 (patch) | |
tree | 1e2c72e6d01842ab23a56a68dda74ae55fc21308 | |
parent | 4fef6dcfa08bd365a8f8fd03a5b3514c8a1bf9e3 (diff) | |
download | SponsorBlock-ffc8f0b6a08a9e215abd87e3fe90610185183599.tar.gz SponsorBlock-ffc8f0b6a08a9e215abd87e3fe90610185183599.zip |
Hide unskip by default on poi segments
-rw-r--r-- | src/components/SkipNoticeComponent.tsx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index a11cdcc1..6329e717 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -303,17 +303,19 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta } getSkipButton(): JSX.Element { - return ( - <span className="sponsorSkipNoticeUnskipSection"> - <button id={"sponsorSkipUnskipButton" + this.idSuffix} - className="sponsorSkipObject sponsorSkipNoticeButton" - style={{marginLeft: "4px"}} - onClick={() => this.prepAction(SkipNoticeAction.Unskip)}> - - {this.state.unskipText + (this.state.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "")} - </button> - </span> - ); + if (this.segments.length > 1 || utils.getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI) { + return ( + <span className="sponsorSkipNoticeUnskipSection"> + <button id={"sponsorSkipUnskipButton" + this.idSuffix} + className="sponsorSkipObject sponsorSkipNoticeButton" + style={{marginLeft: "4px"}} + onClick={() => this.prepAction(SkipNoticeAction.Unskip)}> + + {this.state.unskipText + (this.state.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "")} + </button> + </span> + ); + } } getSubmissionChooser(): JSX.Element[] { |