only allow full video labels on livestreams

This commit is contained in:
Michael C
2022-10-07 16:37:10 -04:00
parent bb7f069254
commit adb8c4c5f9

View File

@@ -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;
}