Skip to content

Commit

Permalink
Make unskipping by keybind easier for multiple segment notices by foc…
Browse files Browse the repository at this point in the history
…using by default

Clicking tab will focus the next button allowing you to unskip the next segment
  • Loading branch information
ajayyy committed Dec 22, 2023
1 parent 67c2a5b commit 58d5036
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/SkipNoticeComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
style={{opacity: this.getSubmissionChooserOpacity(i),
color: this.getSubmissionChooserColor(i)}}
onClick={() => this.performAction(i)}
autoFocus={i == 0}
key={"submission" + i + this.segments[i].category + this.idSuffix}>
{`${(i + 1)}. ${chrome.i18n.getMessage("category_" +
this.segments[i].category)} (${getFormattedTime(this.segments[i].segment[0])})`}
Expand Down Expand Up @@ -459,6 +460,15 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
if (this.segments.length === 1) {
this.performAction(0, action);
} else {
if (this.state.smaller) {
this.setState({
smaller: false
});

this.noticeRef.current.fadedMouseEnter();
this.noticeRef.current.resetCountdown();
}

switch (action ?? this.state.actionState) {
case SkipNoticeAction.None:
this.resetStateToStart();
Expand Down

0 comments on commit 58d5036

Please sign in to comment.