Merge pull request #1514 from mchangrh/fv-livestream-2

Allow full video labels on livestreams
This commit is contained in:
Ajay Ramachandran 2022-12-04 15:04:15 -05:00 committed by GitHub
commit ec86d6f99d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2262,8 +2262,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;
}