mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Merge pull request #1514 from mchangrh/fv-livestream-2
Allow full video labels on livestreams
This commit is contained in:
@@ -2262,8 +2262,10 @@ function submitSponsorTimes() {
|
|||||||
//send the message to the background js
|
//send the message to the background js
|
||||||
//called after all the checks have been made that it's okay to do so
|
//called after all the checks have been made that it's okay to do so
|
||||||
async function sendSubmitMessage() {
|
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
|
// 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"));
|
alert(chrome.i18n.getMessage("liveOrPremiere"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user