mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into videoPreviewButtons
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "SponsorBlock",
|
"short_name": "SponsorBlock",
|
||||||
"version": "4.0.3",
|
"version": "4.0.4",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"homepage_url": "https://sponsor.ajay.app",
|
"homepage_url": "https://sponsor.ajay.app",
|
||||||
|
|||||||
@@ -440,6 +440,9 @@
|
|||||||
"shortCheck": {
|
"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?"
|
"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": {
|
"showUploadButton": {
|
||||||
"message": "Show Upload Button"
|
"message": "Show Upload Button"
|
||||||
},
|
},
|
||||||
@@ -541,10 +544,10 @@
|
|||||||
"message": "Exclusive Access"
|
"message": "Exclusive Access"
|
||||||
},
|
},
|
||||||
"category_exclusive_access_description": {
|
"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": {
|
"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"
|
"description": "Short description for this category"
|
||||||
},
|
},
|
||||||
"category_interaction": {
|
"category_interaction": {
|
||||||
|
|||||||
@@ -1395,8 +1395,9 @@ function shouldAutoSkip(segment: SponsorTime): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shouldSkip(segment: SponsorTime): boolean {
|
function shouldSkip(segment: SponsorTime): boolean {
|
||||||
return utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay ||
|
return (segment.actionType !== ActionType.Full
|
||||||
(Config.config.autoSkipOnMusicVideos && sponsorTimes?.some((s) => s.category === "music_offtopic"));
|
&& 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. */
|
/** Creates any missing buttons on the YouTube player if possible. */
|
||||||
@@ -1797,6 +1798,12 @@ 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() {
|
||||||
|
// 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
|
// Add loading animation
|
||||||
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker.svg");
|
playerButtons.submit.image.src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker.svg");
|
||||||
const stopAnimation = AnimationUtils.applyLoadingAnimation(playerButtons.submit.button, 1, () => updateEditButtonsOnPlayer());
|
const stopAnimation = AnimationUtils.applyLoadingAnimation(playerButtons.submit.button, 1, () => updateEditButtonsOnPlayer());
|
||||||
|
|||||||
Reference in New Issue
Block a user