aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2024-01-23 14:25:07 -0500
committerAjay <[email protected]>2024-01-23 14:25:07 -0500
commit516d624f166967f3afedc39a385ff4685770197f (patch)
tree3f2b68b64322431148a718bbcabe4eab035b10a8
parenta662c3e04f3c61dc53f88d6b99d440bc33c6269a (diff)
downloadSponsorBlock-516d624f166967f3afedc39a385ff4685770197f.tar.gz
SponsorBlock-516d624f166967f3afedc39a385ff4685770197f.zip
Don't require preview for segments ending at end of the video
Fixes #1959
-rw-r--r--src/content.ts3
1 files changed, 2 insertions, 1 deletions
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;
}