From 6788394be10a2f1930e6decfc7113865fd632d9a Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 16 Jan 2022 00:12:27 -0500 Subject: [PATCH 1/4] Fix typo --- public/_locales/en/messages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 8ae945c7..f8157d91 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -541,10 +541,10 @@ "message": "Exclusive Access" }, "category_exclusive_access_description": { - "message": "Only for labeling entire videos. Used when a video showcases a product, service or location that they've recieved free or subsidized access to." + "message": "Only for labeling entire videos. Used when a video showcases a product, service or location that they've received free or subsidized access to." }, "category_exclusive_access_pill": { - "message": "This video showcases a product, service or location that they've recieved free or subsidized access to", + "message": "This video showcases a product, service or location that they've received free or subsidized access to", "description": "Short description for this category" }, "category_interaction": { From 6b6ca6198f7e043a29b9e408772a9c9b0db76973 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 16 Jan 2022 01:17:49 -0500 Subject: [PATCH 2/4] Don't schedule skips for full video segments --- src/content.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index 81ba097b..0d0aa132 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1395,8 +1395,9 @@ function shouldAutoSkip(segment: SponsorTime): boolean { } function shouldSkip(segment: SponsorTime): boolean { - return utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay || - (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic")); + return (segment.actionType !== ActionType.Full + && utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay) + || (Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic")); } /** Creates any missing buttons on the YouTube player if possible. */ From b6c1ee174312af1cb7e15041ae32305f46bd80cd Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 16 Jan 2022 13:56:57 -0500 Subject: [PATCH 3/4] Don't allow submissions on active premieres or livestreams Fix #523 Fix #367 --- public/_locales/en/messages.json | 3 +++ src/content.ts | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index f8157d91..6b8f923f 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -440,6 +440,9 @@ "shortCheck": { "message": "The following submission is shorter than your minimum duration option. This could mean that this is already submitted, and just being ignored due to this option. Are you sure you would like to submit?" }, + "liveOrPremiere": { + "message": "Submitting on an active livesteam or premiere is not allowed. Please wait until it finishes, then refresh the page and verify that the segments are still valid." + }, "showUploadButton": { "message": "Show Upload Button" }, diff --git a/src/content.ts b/src/content.ts index 0d0aa132..37c3812a 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1798,6 +1798,12 @@ 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() { + // Block if submitting on a running livestream or premiere + if (isVisible(document.querySelector(".ytp-live-badge"))) { + alert(chrome.i18n.getMessage("liveOrPremiere")); + return; + } + // Add loading animation playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker.svg"); const stopAnimation = AnimationUtils.applyLoadingAnimation(playerButtons.submit.button, 1, () => updateEditButtonsOnPlayer()); From 154e12f201bcea8bdea701ecf189abdc4aaa3454 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Tue, 18 Jan 2022 13:20:46 -0500 Subject: [PATCH 4/4] bump version --- manifest/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 0358c794..ad4cb1f8 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "4.0.3", + "version": "4.0.4", "default_locale": "en", "description": "__MSG_Description__", "homepage_url": "https://sponsor.ajay.app",