From 516d624f166967f3afedc39a385ff4685770197f Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 23 Jan 2024 14:25:07 -0500 Subject: Don't require preview for segments ending at end of the video Fixes #1959 --- src/content.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/content.ts b/src/content.ts index d4581486..2b8e3213 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2274,7 +2274,8 @@ async function sendSubmitMessage() { if (!previewedSegment && !sponsorTimesSubmitting.every((segment) => - [ActionType.Full, ActionType.Chapter, ActionType.Poi].includes(segment.actionType))) { + [ActionType.Full, ActionType.Chapter, ActionType.Poi].includes(segment.actionType) + || segment.segment[1] >= getVideo()?.duration)) { alert(`${chrome.i18n.getMessage("previewSegmentRequired")} ${keybindToString(Config.config.previewKeybind)}`); return; } -- cgit v1.2.3