mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Use "skipped to" for poi
This commit is contained in:
@@ -289,7 +289,12 @@
|
|||||||
"description": "Used for skipping to things (Skip to Highlight)"
|
"description": "Used for skipping to things (Skip to Highlight)"
|
||||||
},
|
},
|
||||||
"skipped": {
|
"skipped": {
|
||||||
"message": "Skipped"
|
"message": "{0} Skipped",
|
||||||
|
"description": "Example: Sponsor Skipped"
|
||||||
|
},
|
||||||
|
"skipped_to_category": {
|
||||||
|
"message": "Skipped to {0}",
|
||||||
|
"description": "Used for skipping to things (Skipped to Highlight)"
|
||||||
},
|
},
|
||||||
"disableAutoSkip": {
|
"disableAutoSkip": {
|
||||||
"message": "Disable Auto Skip"
|
"message": "Disable Auto Skip"
|
||||||
|
|||||||
@@ -84,8 +84,12 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
|
|
||||||
const categoryName = chrome.i18n.getMessage(this.segments.length > 1 ? "multipleSegments"
|
const categoryName = chrome.i18n.getMessage(this.segments.length > 1 ? "multipleSegments"
|
||||||
: "category_" + this.segments[0].category + "_short") || chrome.i18n.getMessage("category_" + this.segments[0].category);
|
: "category_" + this.segments[0].category + "_short") || chrome.i18n.getMessage("category_" + this.segments[0].category);
|
||||||
let noticeTitle = categoryName + " " + chrome.i18n.getMessage("skipped");
|
let noticeTitle = "";
|
||||||
if (!this.autoSkip) {
|
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
|
const messageId = utils.getCategoryActionType(this.segments[0].category) === CategoryActionType.Skippable
|
||||||
? "skip_category" : "skip_to_category";
|
? "skip_category" : "skip_to_category";
|
||||||
noticeTitle = chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
|
noticeTitle = chrome.i18n.getMessage(messageId).replace("{0}", categoryName);
|
||||||
@@ -303,7 +307,9 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSkipButton(): JSX.Element {
|
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 (
|
return (
|
||||||
<span className="sponsorSkipNoticeUnskipSection">
|
<span className="sponsorSkipNoticeUnskipSection">
|
||||||
<button id={"sponsorSkipUnskipButton" + this.idSuffix}
|
<button id={"sponsorSkipUnskipButton" + this.idSuffix}
|
||||||
|
|||||||
Reference in New Issue
Block a user