From adb8c4c5f96c985f23b9250394170f8ef354435f Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 7 Oct 2022 16:37:10 -0400 Subject: [PATCH] only allow full video labels on livestreams --- src/content.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index afe19ccf..9abeee28 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2143,8 +2143,10 @@ function submitSponsorTimes() { //send the message to the background js //called after all the checks have been made that it's okay to do so async function sendSubmitMessage() { + // check if all segments are full video + const onlyFullVideo = sponsorTimesSubmitting.every((segment) => segment.actionType === ActionType.Full); // Block if submitting on a running livestream or premiere - if (isLivePremiere || isVisible(document.querySelector(".ytp-live-badge"))) { + if (!onlyFullVideo && (isLivePremiere || isVisible(document.querySelector(".ytp-live-badge")))) { alert(chrome.i18n.getMessage("liveOrPremiere")); return; }