diff --git a/maze-utils b/maze-utils index e3388197..33f0b5b7 160000 --- a/maze-utils +++ b/maze-utils @@ -1 +1 @@ -Subproject commit e3388197c3d285087593069bd7a939dbc07e8cb1 +Subproject commit 33f0b5b7579d77171c07c4b79c8eec45adf802dd diff --git a/src/utils/skipRule.ts b/src/utils/skipRule.ts index 0ea0c06e..2882f9a4 100644 --- a/src/utils/skipRule.ts +++ b/src/utils/skipRule.ts @@ -1,3 +1,4 @@ +import { getCurrentPageTitle } from "../../maze-utils/src/elements"; import { getChannelIDInfo, getVideoDuration } from "../../maze-utils/src/video"; import Config from "../config"; import { CategorySelection, CategorySkipOption, SponsorSourceType, SponsorTime } from "../types"; @@ -20,7 +21,8 @@ export enum SkipRuleAttribute { Source = "chapter.source", ChannelID = "channel.id", ChannelName = "channel.name", - VideoDuration = "video.duration" + VideoDuration = "video.duration", + Title = "video.title" } export enum SkipRuleOperator { @@ -119,6 +121,8 @@ function getSkipRuleValue(segment: SponsorTime | VideoLabelsCacheData, rule: Adv return getChannelIDInfo().author; case SkipRuleAttribute.VideoDuration: return getVideoDuration(); + case SkipRuleAttribute.Title: + return getCurrentPageTitle() || ""; default: return undefined; }