aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-08-17 21:44:57 -0400
committerAjay Ramachandran <[email protected]>2021-08-17 21:44:57 -0400
commit56b74d6863fdf733cc0284ba5def3322d7d109db (patch)
tree1e81805f736f837c804b03fbad5941daee151bff /src
parentffc8f0b6a08a9e215abd87e3fe90610185183599 (diff)
downloadSponsorBlock-56b74d6863fdf733cc0284ba5def3322d7d109db.tar.gz
SponsorBlock-56b74d6863fdf733cc0284ba5def3322d7d109db.zip
Use "skipped to" for poi
Diffstat (limited to 'src')
-rw-r--r--src/components/SkipNoticeComponent.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx
index 6329e717..63a53165 100644
--- a/src/components/SkipNoticeComponent.tsx
+++ b/src/components/SkipNoticeComponent.tsx
@@ -84,8 +84,12 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
const categoryName = chrome.i18n.getMessage(this.segments.length > 1 ? "multipleSegments"
: "category_" + this.segments[0].category + "_short") || chrome.i18n.getMessage("category_" + this.segments[0].category);
- let noticeTitle = categoryName + " " + chrome.i18n.getMessage("skipped");
- if (!this.autoSkip) {
+ let noticeTitle = "";
+ if (this.autoSkip) {
+ const messageId = utils.getCategoryActionType(this.segments[0].category) === CategoryActionType.Skippable
+ ? "skipped" : "skipped_to_category";
+ noticeTitle = chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
+ } else {
const messageId = utils.getCategoryActionType(this.segments[0].category) === CategoryActionType.Skippable
? "skip_category" : "skip_to_category";
noticeTitle = chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
@@ -303,7 +307,9 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
}
getSkipButton(): JSX.Element {
- if (this.segments.length > 1 || utils.getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI) {
+ if (this.segments.length > 1
+ || utils.getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI
+ || this.props.unskipTime) {
return (
<span className="sponsorSkipNoticeUnskipSection">
<button id={"sponsorSkipUnskipButton" + this.idSuffix}