Compare commits

..

16 Commits
3.0 ... 3.0.3

Author SHA1 Message Date
Ajay Ramachandran
6de1a58d88 bump version 2021-08-24 02:28:18 -04:00
Ajay Ramachandran
43a9ba0f9e Fix keybind being flaky 2021-08-23 19:51:58 -04:00
Ajay Ramachandran
c3489e54a6 Fix highlight category when minimum duration set 2021-08-23 18:23:03 -04:00
Ajay Ramachandran
75c003b204 Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2021-08-23 15:46:36 -04:00
Ajay Ramachandran
da5de43121 Fix skipping with highlight on invidious 2021-08-23 15:46:35 -04:00
Ajay Ramachandran
d20a44751c bump version 2021-08-23 03:08:01 -04:00
Ajay Ramachandran
15706fd3c4 Fix issue with early highlight breaking skipping 2021-08-22 20:47:46 -04:00
Ajay Ramachandran
a9e43f95f5 Fix highlight auto skipping on music videos 2021-08-22 19:03:24 -04:00
Ajay Ramachandran
11fe87a09e Fix highlight category info appearing to new users 2021-08-22 19:03:05 -04:00
Ajay Ramachandran
52741b2c0a Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2021-08-22 14:13:03 -04:00
Ajay Ramachandran
09b18a4f6d Fix auto skip on music videos for show overlay 2021-08-22 14:13:02 -04:00
Ajay Ramachandran
326385f325 New Crowdin updates (#900) 2021-08-21 12:55:55 -04:00
Ajay Ramachandran
28884f5e9f Bump version 2021-08-21 12:54:09 -04:00
Ajay Ramachandran
50d5f956c6 Refetch when not found no matter the date 2021-08-20 18:56:08 -04:00
Ajay Ramachandran
585038c902 Close skip to highlight when changing videos 2021-08-20 18:43:44 -04:00
Ajay Ramachandran
c79b06aed3 add comment for highlight update 2021-08-20 14:29:28 -04:00
10 changed files with 298 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "3.0",
"version": "3.0.3",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

View File

@@ -770,5 +770,32 @@
},
"helpPageTooSlow": {
"message": "Je to příliš pomalé"
},
"helpPageTooSlow1": {
"message": "Pokud je chcete použít, jsou zde zkratky. Stiskněte pomlčku pro označení začátku/konce sponzorského segmentu a klikněte na apostrof pro odeslání. Tyto zkratky lze změnit v možnostech. Pokud nepoužíváte QWERTY, měli byste si je nejspíše změnit."
},
"helpPageCopyOfDatabase": {
"message": "Mohu získat kopii databáze? Co se stane, pokud zmizíte?"
},
"helpPageCopyOfDatabase1": {
"message": "Databáze je veřejná a dostupná na"
},
"helpPageCopyOfDatabase2": {
"message": "Zdrojový kód je volně dostupný. Takže i když se mi něco stane, vaše příspěvky nebudou ztraceny."
},
"helpPageNews": {
"message": "Novinky a jak to funguje"
},
"helpPageSourceCode": {
"message": "Kde získám zdrojový kód?"
},
"Credits": {
"message": "Poděkování"
},
"highlightNewFeature": {
"message": "Novinka! Dostaňte se k pointě videa jedním kliknutím s novou kategorií zvýraznění"
},
"LearnMore": {
"message": "Zjistit více"
}
}

View File

@@ -74,10 +74,10 @@
"message": "No se han encontrado segmentos"
},
"sponsorStart": {
"message": "El segmento comienza ahora"
"message": "El Segmento Inicia Ahora"
},
"sponsorEnd": {
"message": "El segmento termina ahora"
"message": "El Segmento Termina Ahora"
},
"sponsorCancel": {
"message": "Cancelar Creación de Segmento"
@@ -563,10 +563,10 @@
"message": "Sólo para el uso en vídeos musicales. Esto sólo debe utilizarse para secciones de vídeos musicales que no están ya cubiertos por otra categoría."
},
"category_music_offtopic_short": {
"message": "No musical"
"message": "Sin Música"
},
"category_poi_highlight": {
"message": "Destacar"
"message": "Destacado"
},
"category_poi_highlight_description": {
"message": "La parte del video que la mayoría de gente está buscando. Similar a los comentarios que dicen \"El video comienza en x\"."
@@ -599,7 +599,7 @@
"message": "Mostrar en la barra de búsqueda"
},
"autoSkipOnMusicVideos": {
"message": "Omitir automáticamente todos los segmentos cuando hay un segmento no musical"
"message": "Omitir automáticamente todos los segmentos cuando hay un segmento sin música"
},
"colorFormatIncorrect": {
"message": "Su color está formateado incorrectamente. Debería ser un código hexadecimal de 3 o 6 dígitos con un signo numérico al principio."
@@ -678,7 +678,7 @@
"message": "Comprobación forzada del canal antes de saltarse"
},
"whatForceChannelCheck": {
"message": "Por defecto, se saltará los segmentos inmediatamente antes de saber cuál es el canal. Por defecto, algunos segmentos al principio del vídeo pueden ser salteados en los canales de la lista blanca. Al activar esta opción se evitará esto, pero haciendo que todos los saltos tengan un ligero retraso ya que obtener el ID del canal puede llevar algún tiempo. Este retraso podría ser imperceptible si tienes una Internet rápida."
"message": "Por defecto, se saltará los segmentos inmediatamente antes de saber cuál es el canal. Por defecto, algunos segmentos al principio del vídeo pueden ser salteados en los canales de la lista blanca. Al activar esta opción se evitará esto, pero haciendo que todos los saltos tengan un ligero retraso, ya que obtener el ID del canal puede llevar algún tiempo. Este retraso podría ser imperceptible si tienes una Internet rápida."
},
"forceChannelCheckPopup": {
"message": "Considere la posibilidad de activar \"Comprobación del canal de fuerza antes de saltar\""
@@ -690,7 +690,7 @@
"message": "Categoría Incorrecta"
},
"nonMusicCategoryOnMusic": {
"message": "Este video está clasificado como música. ¿Estás seguro de que esto tiene un patrocinador? Si esto es realmente un \"Segmento sin música\", abre las opciones de extensión y habilita esta categoría. Entonces, puedes enviar este segmento como \"No-Música\" en lugar de patrocinador. Por favor, lee las directrices si estás confundido."
"message": "Este video está clasificado como música. ¿Estás seguro de que esto tiene un sponsor? Si esto es realmente un \"Segmento Sin Música\", abre las opciones de la extensión y activa esta categoría. Entonces, puedes enviar este segmento como \"Sin Música\" en lugar de sponsor. Por favor, lee las instrucciones si estás confundido/a."
},
"multipleSegments": {
"message": "Múltiples segmentos"
@@ -711,6 +711,10 @@
"help": {
"message": "Ayuda"
},
"GotIt": {
"message": "Entendido",
"description": "Used as the button to dismiss a tooltip"
},
"experiementOptOut": {
"message": "No participar en futuros experimentos",
"description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private."
@@ -724,5 +728,74 @@
"voteRejectedWarning": {
"message": "Voto rechazado debido a una advertencia. Haga clic aquí para abrir un chat para resolverlo, o vuelva más tarde cuando tenga tiempo.",
"description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser."
},
"Donate": {
"message": "Donar"
},
"hideDonationLink": {
"message": "Ocular Enlace de Donación"
},
"helpPageThanksForInstalling": {
"message": "Gracias por instalar SponsorBlock."
},
"helpPageReviewOptions": {
"message": "Por favor, revise las siguientes opciones"
},
"helpPageFeatureDisclaimer": {
"message": "Muchas funciones están desactivadas por defecto. Si quiere saltar intros, outros, usar Invidious, etc., actívelos a continuación. También puede ocular/mostrar los elementos de la interfaz."
},
"helpPageHowSkippingWorks": {
"message": "Como funciona el salteo"
},
"helpPageHowSkippingWorks1": {
"message": "Los segmentos de video serán omitidos automáticamente si son encontrados en la base de datos. Puede abrir la ventana emergente haciendo clic en el ícono de la extensión para obtener una vista previa de los que son."
},
"helpPageHowSkippingWorks2": {
"message": "Cada vez que salte un segmento, recibirá un aviso. ¡Si el tiempo parece equivocado, dele un voto negativo! También puede votar en la ventana emergente."
},
"Submitting": {
"message": "Envío"
},
"helpPageSubmitting1": {
"message": "El envío puede realizarse desde la ventana emergente pulsando el botón \"El Segmento Inicia Ahora\" o en el reproductor de video con los botones de este."
},
"helpPageSubmitting2": {
"message": "Hacer clic en el botón de reproducir indica el inicio de un segmento y hacer clic en el icono de detener indica el final de este. Puede preparar múltiples sponsors antes de enviarlos. Hacer clic en el botón de subida lo(s) enviará. Hacer clic en la papelera lo(s) borrará."
},
"Editing": {
"message": "Edición"
},
"helpPageEditing1": {
"message": "Si se equivoca, puede editar o eliminar sus segmentos después de hacer clic en el botón de flecha hacia arriba."
},
"helpPageTooSlow": {
"message": "Esto es muy lento"
},
"helpPageTooSlow1": {
"message": "Hay teclas de acceso directo, si quiere usarlas. Presione la tecla de punto y coma para indicar el inicio/final de un segmento de sponsor y haga clic en el apóstrofe para enviar. Estas se pueden cambiar en las opciones. Si no usa un teclado QWERTY, probablemente debería cambiar la asignación de teclas."
},
"helpPageCopyOfDatabase": {
"message": "¿Puedo obtener una copia de la base de datos? ¿Qué sucede si tú desapareces?"
},
"helpPageCopyOfDatabase1": {
"message": "La base de datos es pública y disponible en"
},
"helpPageCopyOfDatabase2": {
"message": "El código fuente está disponible libremente. Así que, aun si algo me sucede, sus envíos no se perderán."
},
"helpPageNews": {
"message": "Noticias y cómo se hace"
},
"helpPageSourceCode": {
"message": "¿Dónde puedo conseguir el código fuente?"
},
"Credits": {
"message": "Créditos"
},
"highlightNewFeature": {
"message": "¡Nuevo! Llega al punto del video con un solo clic con la nueva categoría \"destacado\""
},
"LearnMore": {
"message": "Aprenda Más"
}
}

View File

@@ -711,6 +711,10 @@
"help": {
"message": "Ajuda"
},
"GotIt": {
"message": "Entendi",
"description": "Used as the button to dismiss a tooltip"
},
"experiementOptOut": {
"message": "Optar por sair de todos os experimentos futuros",
"description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private."
@@ -724,5 +728,74 @@
"voteRejectedWarning": {
"message": "Voto rejeitado devido a um aviso. Clique para abrir um chat para resolvê-lo, ou volte mais tarde quando tiver tempo.",
"description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser."
},
"Donate": {
"message": "Doar"
},
"hideDonationLink": {
"message": "Ocultar o Link de Doação"
},
"helpPageThanksForInstalling": {
"message": "Obrigado por instalar o SponsorBlock."
},
"helpPageReviewOptions": {
"message": "Por favor revise as opções abaixo"
},
"helpPageFeatureDisclaimer": {
"message": "Muitoa recursos são desativados por padrão. Se você deseja pular introduções, encerramentos, usar o Invidious, etc, ative as opções abaixo. Você também pode ocultar/mostrar elementos da interface."
},
"helpPageHowSkippingWorks": {
"message": "Como a função pular funciona"
},
"helpPageHowSkippingWorks1": {
"message": "Segmentos do vídeo serão pulados automaticamente se forem encontrados na base de dados. Você pode abrir a pop-up clicando no ícone da extensão para ter uma prévia de quais são."
},
"helpPageHowSkippingWorks2": {
"message": "Sempre que você pular um segmento, você receberá um aviso. Se o tempo estiver errado vote contra clicando no voto negativo! Você também pode votar na pop-up."
},
"Submitting": {
"message": "Enviando"
},
"helpPageSubmitting1": {
"message": "O envio pode ser feito no pop-up apertando o botão \"Segmento começa Agora\" ou no reprodutor de vídeo com os botões no reprodutor."
},
"helpPageSubmitting2": {
"message": "Clicar no botão inicio indica o começo de um segmento e clicar no ícone parar indica o fim. Você pode preparar vários patrocinadores antes de clicar em enviar. Clicar no botão upload irá enviar. Clicar no lixo irá excluir."
},
"Editing": {
"message": "Editando"
},
"helpPageEditing1": {
"message": "Se você errar, você pode editar ou deletar seus segmentos clicando na seta para cima."
},
"helpPageTooSlow": {
"message": "Isto está muito devagar"
},
"helpPageTooSlow1": {
"message": "Há teclas de atalho se você quiser usá-las. Pressione a tecla ponto e vírgula para indicar o início/fim de um segmento de patrocinador e clique no apóstrofo para enviar. Estas podem ser alteradas nas opções. Se você não usa QWERTY, você provavelmente deve alterar as teclas vinculadas."
},
"helpPageCopyOfDatabase": {
"message": "Posso baixar uma cópia do banco de dados? O que acontece se vocês desaparecerem?"
},
"helpPageCopyOfDatabase1": {
"message": "O banco de dados é público e está disponível em"
},
"helpPageCopyOfDatabase2": {
"message": "O código-fonte está disponível gratuitamente. Então, mesmo que algo aconteça comigo, seus envios não estarão perdidos."
},
"helpPageNews": {
"message": "Notícias e como tudo é feito"
},
"helpPageSourceCode": {
"message": "Onde posso obter o código-fonte?"
},
"Credits": {
"message": "Créditos"
},
"highlightNewFeature": {
"message": "Novo! Vá direto ao ponto do vídeo com um clique com a nova categoria de Destaque"
},
"LearnMore": {
"message": "Saiba mais"
}
}

View File

@@ -227,6 +227,21 @@
"showSkipNotice": {
"message": "Visa ett meddelande efter att ett segment har hoppats över"
},
"noticeVisibilityMode0": {
"message": "Hoppa över-meddelanden i fullstorlek"
},
"noticeVisibilityMode1": {
"message": "Små meddelanden för automatisk hoppa över"
},
"noticeVisibilityMode2": {
"message": "Alla hoppa över-meddelanden är små"
},
"noticeVisibilityMode3": {
"message": "Meddelanden som tonar bort för automatisk hoppa över"
},
"noticeVisibilityMode4": {
"message": "Alla hoppa över-meddelanden tonas bort"
},
"longDescription": {
"message": "SponsorBlock låter dig hoppa över sponsormeddelanden, introduktioner, eftertexter, prenumerationspåminnelser och andra irriterande delar av YouTube-videor. SponsorBlock är ett crowdsourced webbläsartillägg som låter vem som helst att skicka in start- och sluttid på sponsorsegment och andra segment av YouTube-videor. När en person skickar in denna information kommer alla andra som har detta tillägg installerat att hoppa över det sponsrade segmentet. Du kan även hoppa över icke-musikavsnitt i musikvideor.",
"description": "Full description of the extension on the store pages."
@@ -669,7 +684,7 @@
"message": "Överväg att aktivera \"Tvinga kontroll av kanalen innan hoppa över\""
},
"downvoteDescription": {
"message": "Fel timing"
"message": "Fel/Fel tidsintervall"
},
"incorrectCategory": {
"message": "Fel kategori"
@@ -696,6 +711,10 @@
"help": {
"message": "Hjälp"
},
"GotIt": {
"message": "Jag förstår",
"description": "Used as the button to dismiss a tooltip"
},
"experiementOptOut": {
"message": "Hoppa av alla framtida experiment",
"description": "This is used in a popup about a new experiment to get a list of unlisted videos to back up since all unlisted videos uploaded before 2017 will be set to private."
@@ -709,5 +728,74 @@
"voteRejectedWarning": {
"message": "Rösten avvisades på grund av en varning. Klicka för att öppna ett chattfönster för att lösa problemet eller kom tillbaka senare när du har tid.",
"description": "This is an integrated chat panel that will appearing allowing them to talk to the Discord/Matrix chat without leaving their browser."
},
"Donate": {
"message": "Donera"
},
"hideDonationLink": {
"message": "Dölj donationslänk"
},
"helpPageThanksForInstalling": {
"message": "Tack för att du installerade SponsorBlock."
},
"helpPageReviewOptions": {
"message": "Granska alternativen nedan"
},
"helpPageFeatureDisclaimer": {
"message": "Många funktioner är inaktiverade som standard. Om du vill hoppa över intros, outros, använda Invidious, etc, aktivera dem nedan. Du kan också dölja/visa UI-element."
},
"helpPageHowSkippingWorks": {
"message": "Hur hoppa över fungerar"
},
"helpPageHowSkippingWorks1": {
"message": "Videosegment hoppas över automatiskt om de finns i databasen. Du kan öppna popup-fönstret genom att klicka på tilläggsikonen för att få en förhandsvisning av vad de är."
},
"helpPageHowSkippingWorks2": {
"message": "När du hoppar över ett segment får du ett meddelande. Om tidpunkten verkar felaktig rösta då ner genom att klicka på nerröstning! Du kan också rösta i popup-fönstret."
},
"Submitting": {
"message": "Skickar in"
},
"helpPageSubmitting1": {
"message": "Skicka in kan antingen göras i popup-fönstret genom att trycka på knappen \"Segmentet startar nu\" eller i videospelaren med knapparna på spelaren."
},
"helpPageSubmitting2": {
"message": "Genom att klicka på uppspelningsknappen anges början på ett segment och genom att klicka på stopp-ikonen anges slutet. Du kan förbereda flera sponsorer innan du trycker på skicka. Klicka på uppladdningsknappen för att skicka in. Klicka på papperskorgen för att ta bort."
},
"Editing": {
"message": "Redigerar"
},
"helpPageEditing1": {
"message": "Om du gör fel kan du redigera eller ta bort dina segment efter att du klickat på uppåtpilen."
},
"helpPageTooSlow": {
"message": "Detta är för långsamt"
},
"helpPageTooSlow1": {
"message": "Det finns snabbtangenter om du vill använda dem. Tryck på semikolontangenten för att ange start/slut på ett sponsorsegment och klicka på apostrofen för att skicka in. Dessa kan ändras i inställningarna. Om du inte använder QWERTY, bör du förmodligen ändra tangentbindningen."
},
"helpPageCopyOfDatabase": {
"message": "Kan jag få en kopia av databasen? Vad händer om du försvinner?"
},
"helpPageCopyOfDatabase1": {
"message": "Databasen är offentlig och finns på"
},
"helpPageCopyOfDatabase2": {
"message": "Källkoden är fritt tillgänglig. Så, även om något händer mig, är dina bidrag inte förlorade."
},
"helpPageNews": {
"message": "Nyheter och hur är det gjort"
},
"helpPageSourceCode": {
"message": "Var kan jag få tag på källkoden?"
},
"Credits": {
"message": "Medverkande"
},
"highlightNewFeature": {
"message": "Nytt! Ta dig till stället i videon med ett klick med den nya markeringskategorin"
},
"LearnMore": {
"message": "Läs mer"
}
}

View File

@@ -81,7 +81,7 @@ chrome.runtime.onInstalled.addListener(function () {
//save this UUID
Config.config.userID = newUserID;
Config.config.highlightCategoryUpdate = false;
Config.config.highlightCategoryUpdate = true;
}
}, 1500);
});

View File

@@ -358,6 +358,7 @@ function fetchConfig(): Promise<void> {
}
function migrateOldFormats(config: SBConfig) {
// Should eventually move into defaults
if (!config["highlightCategoryAdded"] && !config.categorySelections.some((s) => s.name === "poi_highlight")) {
config["highlightCategoryAdded"] = true;

View File

@@ -252,6 +252,8 @@ function resetValues() {
for (let i = 0; i < skipNotices.length; i++) {
skipNotices.pop().close();
}
skipButtonControlBar?.disable();
}
async function videoIDChange(id) {
@@ -284,7 +286,7 @@ async function videoIDChange(id) {
}
// Get new video info
getVideoInfo();
// getVideoInfo(); // Seems to have been replaced
// Update whitelist data when the video data is loaded
whitelistCheck();
@@ -442,8 +444,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
}
// Don't skip if this category should not be skipped
if (utils.getCategorySelection(currentSkip.category)?.option === CategorySkipOption.ShowOverlay
&& skipInfo.array !== sponsorTimesSubmitting) return;
if (!shouldSkip(currentSkip) && skipInfo.array !== sponsorTimesSubmitting) return;
const skippingFunction = () => {
let forcedSkipTime: number = null;
@@ -674,7 +675,8 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
// Hide all submissions smaller than the minimum duration
if (Config.config.minDuration !== 0) {
for (let i = 0; i < sponsorTimes.length; i++) {
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration) {
if (sponsorTimes[i].segment[1] - sponsorTimes[i].segment[0] < Config.config.minDuration
&& getCategoryActionType(sponsorTimes[i].category) !== CategoryActionType.POI) {
sponsorTimes[i].hidden = SponsorHideType.MinimumDuration;
}
}
@@ -724,19 +726,11 @@ function retryFetch(): void {
sponsorDataFound = false;
//check if this video was uploaded recently
utils.wait(() => !!videoInfo).then(() => {
const dateUploaded = videoInfo?.microformat?.playerMicroformatRenderer?.uploadDate;
//if less than 3 days old
if (Date.now() - new Date(dateUploaded).getTime() < 259200000) {
setTimeout(() => {
if (sponsorVideoID && sponsorTimes?.length === 0) {
sponsorsLookup(sponsorVideoID);
}
}, 10000 + Math.random() * 30000);
setTimeout(() => {
if (sponsorVideoID && sponsorTimes?.length === 0) {
sponsorsLookup(sponsorVideoID);
}
});
}, 10000 + Math.random() * 30000);
sponsorLookupRetries = 0;
}
@@ -798,6 +792,8 @@ function startSkipScheduleCheckingForStartSponsors() {
/**
* Get the video info for the current tab from YouTube
*
* TODO: Replace
*/
async function getVideoInfo(): Promise<void> {
const result = await utils.asyncRequestToCustomServer("GET", "https://www.youtube.com/get_video_info?video_id=" + sponsorVideoID + "&html5=1&c=TVHTML5&cver=7.20190319");
@@ -966,14 +962,14 @@ function getNextSkipIndex(currentTime: number, includeIntersectingSegments: bool
if ((minUnsubmittedSponsorTimeIndex === -1 && minSponsorTimeIndex !== -1) ||
sponsorStartTimes[minSponsorTimeIndex] < unsubmittedSponsorStartTimes[minUnsubmittedSponsorTimeIndex]) {
return {
array: sponsorTimes,
array: sponsorTimes.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable),
index: minSponsorTimeIndex,
endIndex: endTimeIndex,
openNotice: true
};
} else {
return {
array: sponsorTimesSubmitting,
array: sponsorTimesSubmitting.filter((segment) => getCategoryActionType(segment.category) === CategoryActionType.Skippable),
index: minUnsubmittedSponsorTimeIndex,
endIndex: previewEndTimeIndex,
openNotice: false
@@ -1042,7 +1038,7 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
if ((minimum === undefined
|| ((includeNonIntersectingSegments && sponsorTimes[i].segment[0] >= minimum)
|| (includeIntersectingSegments && sponsorTimes[i].segment[0] < minimum && sponsorTimes[i].segment[1] > minimum)))
&& (!onlySkippableSponsors || utils.getCategorySelection(sponsorTimes[i].category).option !== CategorySkipOption.ShowOverlay)
&& (!onlySkippableSponsors || shouldSkip(sponsorTimes[i]))
&& (!hideHiddenSponsors || sponsorTimes[i].hidden === SponsorHideType.Visible)
&& getCategoryActionType(sponsorTimes[i].category) === CategoryActionType.Skippable) {
@@ -1194,6 +1190,12 @@ function createButton(baseID: string, title: string, callback: () => void, image
function shouldAutoSkip(segment: SponsorTime): boolean {
return utils.getCategorySelection(segment.category)?.option === CategorySkipOption.AutoSkip ||
(Config.config.autoSkipOnMusicVideos && sponsorTimes.some((s) => s.category === "music_offtopic")
&& getCategoryActionType(segment.category) === CategoryActionType.Skippable);
}
function shouldSkip(segment: SponsorTime): boolean {
return utils.getCategorySelection(segment.category)?.option !== CategorySkipOption.ShowOverlay ||
(Config.config.autoSkipOnMusicVideos && sponsorTimes.some((s) => s.category === "music_offtopic"));
}
@@ -1624,7 +1626,8 @@ async function sendSubmitMessage() {
// Check to see if any of the submissions are below the minimum duration set
if (Config.config.minDuration > 0) {
for (let i = 0; i < sponsorTimesSubmitting.length; i++) {
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration) {
if (sponsorTimesSubmitting[i].segment[1] - sponsorTimesSubmitting[i].segment[0] < Config.config.minDuration
&& getCategoryActionType(sponsorTimesSubmitting[i].category) !== CategoryActionType.POI) {
const confirmShort = chrome.i18n.getMessage("shortCheck") + "\n\n" +
getSegmentsMessage(sponsorTimesSubmitting);

View File

@@ -51,7 +51,7 @@ export class SkipButtonControlBar {
const leftControlsContainer = document.querySelector(".ytp-left-controls");
this.chapterText = document.querySelector(".ytp-chapter-container");
if (!leftControlsContainer.contains(this.container)) {
if (leftControlsContainer && !leftControlsContainer.contains(this.container)) {
leftControlsContainer.insertBefore(this.container, this.chapterText);
}
}

View File

@@ -54,7 +54,7 @@ class SkipNotice {
}
setShowKeybindHint(value: boolean): void {
this.skipNoticeRef.current.setState({
this.skipNoticeRef?.current?.setState({
showKeybindHint: value
});
}
@@ -69,7 +69,7 @@ class SkipNotice {
}
toggleSkip(): void {
this.skipNoticeRef.current.prepAction(SkipNoticeAction.Unskip);
this.skipNoticeRef?.current?.prepAction(SkipNoticeAction.Unskip);
}
}