diff --git a/config.json.example b/config.json.example index fd6afe22..1912aaee 100644 --- a/config.json.example +++ b/config.json.example @@ -13,7 +13,7 @@ "preview": ["skip", "mute"], "filler": ["skip", "mute"], "music_offtopic": ["skip"], - "poi_highlight": ["skip"] + "poi_highlight": ["poi"] }, "wikiLinks": { "sponsor": "https://wiki.sponsor.ajay.app/w/Sponsor", diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 49dac9ab..588405fe 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -1,13 +1,13 @@ import * as React from "react"; import * as CompileConfig from "../../config.json"; import Config from "../config" -import { Category, ContentContainer, CategoryActionType, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType, SponsorSourceType, SegmentUUID } from "../types"; +import { Category, ContentContainer, SponsorHideType, SponsorTime, NoticeVisbilityMode, ActionType, SponsorSourceType, SegmentUUID } from "../types"; import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; import Utils from "../utils"; const utils = new Utils(); -import { getCategoryActionType, getSkippingText } from "../utils/categoryUtils"; +import { getSkippingText } from "../utils/categoryUtils"; import ThumbsUpSvg from "../svg-icons/thumbs_up_svg"; import ThumbsDownSvg from "../svg-icons/thumbs_down_svg"; @@ -326,7 +326,7 @@ class SkipNoticeComponent extends React.Component 1 - || getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI + || this.segments[0].actionType !== ActionType.Poi || this.props.unskipTime)) { const style: React.CSSProperties = { @@ -547,7 +547,7 @@ class SkipNoticeComponent extends React.Component getCategoryActionType(cat as Category) === CategoryActionType.Skippable))) as Category[]; + const categories = (CompileConfig.categoryList.filter((cat => CompileConfig.categorySupport[cat].includes(ActionType.Skip)))) as Category[]; for (const category of categories) { elements.push(