Advanced skip options
(Redirected from Advanced Skip Options)
Advanced skip options can be used to change the skip options depending on certain criteria of the submission itself.
Example:
// Skip sponsors at the start of the video
if time.start < 1 and time.end < 10 and category == "sponsor"
Auto skip
Description
Each rule consists of the word if, a condition, and an action.
Conditions can be checks of the form <attribute> <operator> <value> (for example, time.start < 1), or nested expressions using the and, or, and not operators.
Attributes
The following attributes are supported:
time.start(when the segment starts in the video in seconds)time.end(when the segment ends in the video in seconds)time.duration(how long the segment is in seconds)time.startPercent(when the segment starts in the video as a percentage)time.endPercent(when the segment ends in the video as a percentage)time.durationPercent(how long the segment is as a percentage of the total video length)categoryactionTypechapter.name(the title for chapters)chapter.source(to separate SponsorBlock chapters from YouTube chapters)channel.id(ID starting withUC)channel.name(plain text name with spaces)video.duration(the length of the video in seconds)video.title
Operators
The following operators are supported:
<<=>>===!=(not equal)*=(contains text ignore case)!*=(not contains ignore case)~=(matches regex)~i=(matches regex ignore case)!~=(doesn't match regex)!~i=(doesn't match regex ignore case)
Actions
The following actions are supported:
DisabledShow overlayManual skipAuto skip
Unlike other words in the format, actions are case-insensitive.
Categories
The following categories are supported:
-
sponsor(Sponsor) -
selfpromo(Unpaid/Self Promotion) -
exclusive_access(Full Video Labels) -
interaction(Interaction Reminder (Subscribe)) -
poi_highlight(Highlight) -
intro(Intermission/Intro Animation) -
outro(Endcards/Credits) -
preview(Preview/Recap) -
hook(Hook/Greetings) -
filler(Tangents/Jokes) -
chapter(Chapter) -
music_offtopic(Music: Non-Music Section)
Chapter sources
The following chapter.source values are supported:
serveryoutubeautogeneratedlocal
More examples
// Auto skip chapters that contain the word bloopers (case insensitive)
if category == "chapter" and chapter.name *= "bloopers"
Auto skip
// Auto skip chapters that start with the word Intro or intro
if category == "chapter" and chapter.name ~= "^[Ii]ntro"
Auto skip
// Auto skip chapters that start with the word Intro or intro but only if they are made by the YouTuber
if category == "chapter" and chapter.name ~= "^[Ii]ntro" and chapter.source == "youtube"
Auto skip
// Auto skip chapters that start with the word Intro or intro but only if they are submitted by a SponsorBlock user
if category == "chapter" and chapter.name ~= "^[Ii]ntro" and chapter.source == "server"
Auto skip
// Auto skip preview/recap on this specific channel
if category == "preview" and channel.id == "UCX8wm5-NEzN-eL-DNcsRRJA"
Auto skip
// Auto skip intros on channels with names containing trains
if category == "intro" and channel.name *= "trains"
Auto skip
// Auto skip tangent/jokes or hooks at least 5 seconds long
if (category == "filler" or category == "hook") and time.duration >= 5
Auto skip
Syntax
rule set = { rule };
rule = { comment }, "if", predicate, skip option;
comment = "//", ? rest of line ?;
predicate = or;
or = and, { "or", and };
and = unary, { "and", unary };
unary = "not", unary | primary;
primary = "(", predicate, ")" | check;
check = attribute, operator, value;
attribute = "time.startPercent" | "time.start" | "time.endPercent" | "time.end" | "time.durationPercent" | "time.duration" | "category" | "actionType" | "chapter.name" | "chapter.source" | "channel.id" | "channel.name" | "video.duration" | "video.title";
operator = "<=" | "<" | ">=" | ">" | "!=" | "==" | "!*=" | "*=" | "!~=" | "~=" | "!~i=" | "~i=";
value = ? JSON string ? | ? JSON number ?;
(* skip options are case-insensitive *)
skip option = "disabled" | "show overlay" | "manual skip" | "auto skip";