Compare commits

...

13 Commits
4.1.2 ... 4.1.4

Author SHA1 Message Date
Ajay
84a234f9b6 Fix full video saving old times
Fix #1198
2022-02-22 01:21:18 -05:00
Ajay
fd5ab9f153 bump version 2022-02-22 01:06:09 -05:00
Ajay
30fe40a523 Fix minimum duration
Fix #1202
2022-02-22 01:05:57 -05:00
Ajay
6e23650a99 Add category pill right away
Fix #1199
2022-02-22 01:01:27 -05:00
Ajay
d6a0029b85 Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2022-02-16 13:28:10 -05:00
Ajay
f25f986200 Fix category pill option
Fixes #1196
2022-02-16 13:27:50 -05:00
Ajay Ramachandran
8843fb767e Merge pull request #1195 from ajayyy/dependabot/npm_and_yarn/follow-redirects-1.14.8
Bump follow-redirects from 1.14.7 to 1.14.8
2022-02-15 10:44:01 -05:00
dependabot[bot]
3a17299610 Bump follow-redirects from 1.14.7 to 1.14.8
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 12:21:10 +00:00
Ajay Ramachandran
a2a5d27900 bump version 2022-02-12 13:21:43 -05:00
Ajay Ramachandran
eb9e2d8726 New Crowdin updates (#1186) 2022-02-12 12:17:06 -05:00
Ajay Ramachandran
ddc34bacc7 Merge pull request #1188 from AronHK/keybindFix
Fix keybind sometimes not working
2022-02-12 12:16:41 -05:00
Áron Hegymegi-Kiss
60b0a59ba1 keybind fix 2022-02-12 16:19:28 +01:00
Ajay
c9903b5926 Don't use setinterval on safari 2022-02-09 15:28:02 -05:00
10 changed files with 69 additions and 25 deletions

View File

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

12
package-lock.json generated
View File

@@ -6301,9 +6301,9 @@
}
},
"node_modules/follow-redirects": {
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==",
"version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
"dev": true,
"funding": [
{
@@ -18854,9 +18854,9 @@
"dev": true
},
"follow-redirects": {
"version": "1.14.7",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz",
"integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==",
"version": "1.14.8",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz",
"integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==",
"dev": true
},
"forever-agent": {

View File

@@ -233,9 +233,15 @@
"noticeVisibilityMode1": {
"message": "Μικρές ειδοποιήσεις αυτόματης παράλειψης"
},
"noticeVisibilityMode2": {
"message": "Να είναι όλες μικρές ειδοποιήσεις"
},
"noticeVisibilityMode3": {
"message": "Ξεθωριασμένες ειδοποιήσεις αυτόματης παράλειψης"
},
"noticeVisibilityMode4": {
"message": "Να είναι όλες ξεθωριασμένες ειδοποιήσεις"
},
"longDescription": {
"message": "Το SponsorBlock σας επιτρέπει να παραλείψετε χορηγίες, εισαγωγές, επίλογους, υπενθυμίσεις εγγραφής, και άλλα ενοχλητικά μέρη των βίντεο YouTube. Το SponsorBlock είναι μια επέκταση που τροφοδοτείται, από τους ίδιους τους χρήστες, επιτρέπει στον κάθε έναν να υποβάλει το πότε ξεκινούν και πότε τελειώνουν τμήματα χορηγιών των βίντεο YouTube. Μόλις κάποιος χρήστης υποβάλει αυτή τη πληροφορία, ο οποιοσδήποτε άλλος που έχει αυτήν την επέκταση μπορεί να παραλείψει όλα αυτά τα ενοχλητικά τμήματα χορηγιών. Μπορείτε επίσης να παραλείψετε τμήματα, που δεν περιέχουν μουσική, σε μουσικά βίντεο.",
"description": "Full description of the extension on the store pages."
@@ -356,20 +362,20 @@
"message": "Υποστήριξη 3των ιστοσελίδων τύπου YouTube"
},
"supportOtherSitesDescription": {
"message": "Υποστήριξη 3των πελατών διακομιστή YouTube. Για να ενεργοποιήσετε την υποστήριξη πρέπει να αποδεχτείτε επιπλέον άδειες. Αυτό δε λειτουργεί σε καρτέλες ανώνυμης περιήγησης του Chrome ή άλλων Chromium εκδοχών.",
"message": "Υποστήριξη 3των πελατών διακομιστή YouTube. Για να ενεργοποιήσετε την υποστήριξη πρέπει να αποδεχτείτε επιπλέον άδειες. Αυτό ΔΕ λειτουργεί σε καρτέλες ανώνυμης περιήγησης του Chrome ή άλλων Chromium εκδοχών.",
"description": "This replaces the 'supports Invidious' option because it now works on other YouTube sites such as Cloudtube"
},
"supportedSites": {
"message": "Υποστηριζόμενες Ιστοσελίδες: "
},
"optionsInfo": {
"message": "Ενεργοποίηση υποστήριξης Ανεπιθύμητων, απενεργοποίηση αυτόματης παράληψης, απόκρυψη κουμπιών και άλλα."
"message": "Ενεργοποίηση υποστήριξης «Invidious», απενεργοποίηση αυτόματης παράληψης, απόκρυψη κουμπιών και άλλα."
},
"addInvidiousInstance": {
"message": "Προσθήκη 3ου πελάτη συνεδρίας"
},
"addInvidiousInstanceDescription": {
"message": "Προσθέστε μια προσαρμοσμένη συνεδρία. Αυτό πρέπει να είναι μορφοποιημένο μόνο με την διεύθυνση. Για παράδειγμα: invidious.ajay.app"
"message": "Προσθέστε μια προσαρμοσμένη συνεδρία. Αυτό πρέπει να είναι μορφοποιημένο MONO με την διεύθυνση. Για παράδειγμα: invidious.ajay.app"
},
"add": {
"message": "Προσθήκη"
@@ -378,10 +384,10 @@
"message": "Μη έγκυρη διεύθυνση. Θα πρέπει να περιλαμβάνεται ΜΟΝΟ αυτό το μέρος της διεύθυνσης.\nΓια παράδειγμα: invidious.ajay.app"
},
"resetInvidiousInstance": {
"message": "Επαναφορά Λίστας Ανεπιθύμητων"
"message": "Επαναφορά Λίστας «Invidious»"
},
"resetInvidiousInstanceAlert": {
"message": "Πρόκειται να επαναφέρετε τη λίστα Ανεπιθύμητων"
"message": "Πρόκειται να επαναφέρετε τη λίστα «Invidious»"
},
"currentInstances": {
"message": "Τρέχουσες Συνεδρίες:"
@@ -591,7 +597,7 @@
"message": "Όλες οι υποβολές και οι ψήφοι ΔΕΝ ΘΑ ΜΕΤΡΙΣΟΥΝ στον κύριο διακομιστή κατά τη σύνδεση με τον δοκιμαστικό διακομιστή. Σιγουρευτείτε για να την απενεργοποιήσετε όταν θέλετε να κάνετε πραγματικές υποβολές."
},
"bracketNow": {
"message": "(τώρα)"
"message": "(εδώ)"
},
"moreCategories": {
"message": "Περισσότερες κατηγορίες"
@@ -607,7 +613,7 @@
"message": "Πρέπει να επιλέξετε Κατηγορία για όλα τα τμήματα που υποβάλετε!"
},
"bracketEnd": {
"message": "(Τέλος)"
"message": "(τέλος)"
},
"hiddenDueToDownvote": {
"message": "κρυφό: αρνητική ψήφος"
@@ -698,6 +704,9 @@
"helpPageReviewOptions": {
"message": "Παρακαλώ ελέγξτε τις παρακάτω ρυθμίσεις"
},
"helpPageFeatureDisclaimer": {
"message": "Πολλές δυνατότητες είναι ανενεργές από προεπιλογή. Εάν θέλετε να παραλείπετε εισαγωγές, επίλογους, χρήση «Invidious», κτλ., ενεργοποιήστε τα παρακάτω. Μπορείτε επίσης να κρύψετε/εμφανίσετε στοιχεία της διεπαφής."
},
"helpPageHowSkippingWorks": {
"message": "Πως λειτουργεί η παράλειψη"
},

View File

@@ -209,6 +209,15 @@
"enableViewTrackingInPrivate": {
"message": "Activar el seguimiento del número de saltos en las pestañas privadas/de incógnito"
},
"enableTrackDownvotes": {
"message": "Almacenar los votos negativos de los segmentos"
},
"whatTrackDownvotes": {
"message": "Los segmentos que votes negativamente permanecerán ocultos incluso después de actualizar la página"
},
"trackDownvotesWarning": {
"message": "Advertencia: Desactivar esto eliminará todos los votos negativos previamente almacenados"
},
"enableQueryByHashPrefix": {
"message": "Consulta Por Prefijo Hash"
},
@@ -582,6 +591,9 @@
"category_preview_description": {
"message": "Recapitulación rápida de los episodios anteriores, o una vista previa de lo que va a ocurrir más adelante en el vídeo actual. Está pensado para clips editados juntos, no para resúmenes hablados."
},
"category_filler": {
"message": "Tangentes de Relleno/Chistes"
},
"category_filler_description": {
"message": "Escenas tangenciales añadidas solo para relleno o humor que no son necesarias para entender el contenido principal del video. Esto no debe incluir segmentos que proporcionen contexto o detalles de fondo."
},
@@ -694,6 +706,9 @@
"hiddenDueToDuration": {
"message": "oculto: demasiado corto"
},
"manuallyHidden": {
"message": "manualmente oculto"
},
"channelDataNotFound": {
"description": "This error appears in an alert when they try to whitelist a channel and the extension is unable to determine what channel they are looking at.",
"message": "El ID del canal no está cargado todavía. Si está usando un vídeo incrustado, intente usar la página de inicio de YouTube en su lugar. Esto también podría ser causado por cambios en el diseño de YouTube, si lo cree, haga un comentario aquí:"
@@ -780,6 +795,9 @@
"Donate": {
"message": "Donar"
},
"considerDonating": {
"message": "Ayuda a financiar el desarrollo"
},
"hideDonationLink": {
"message": "Ocular Enlace de Donación"
},

View File

@@ -591,6 +591,9 @@
"category_preview_description": {
"message": "Riepilogo rapido degli episodi precedenti, o un'anteprima di ciò che sta arrivando più tardi nel video attuale. Inteso per clip, non per riassunti a voce."
},
"category_filler": {
"message": "Riempitivi irrilevanti/Battute"
},
"category_filler_description": {
"message": "Le scene riempitive sono aggiunte solo per riempire o per umorismo che non sono richieste per comprendere il contenuto principale del video. Questo non dovrebbe includere segmenti che forniscono contesto o dettagli di sfondo."
},

View File

@@ -591,6 +591,9 @@
"category_preview_description": {
"message": "Краткое содержание предыдущих эпизодов или предварительный просмотр того, что будет в данном видео. Предназначено для сегментов, смонтированных из кусков видео, а не для устных пересказов."
},
"category_filler": {
"message": "Заполнение отвлечёнными темами/шутками"
},
"category_filler_description": {
"message": "Сегменты, которые увеличивают длительность видео за счёт отвлечённых тем или шуток, но не требуются для понимания основного содержания. Не должно иметь сегментов, объясняющие контекст или предысторию."
},

View File

@@ -90,7 +90,7 @@
</div>
</div>
<div option-type="toggle" data-sync="fullVideoSegments">
<div data-type="toggle" data-sync="fullVideoSegments">
<div class="switch-container">
<label class="switch">
<input id="fullVideoSegments" type="checkbox" checked>

View File

@@ -381,21 +381,21 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
}
const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index];
this.handleReplacingLostTimes(event.target.value as Category, sponsorTime.actionType);
this.handleReplacingLostTimes(event.target.value as Category, sponsorTime.actionType, sponsorTime);
this.saveEditTimes();
}
actionTypeSelectionChange(event: React.ChangeEvent<HTMLSelectElement>): void {
const sponsorTime = this.props.contentContainer().sponsorTimesSubmitting[this.props.index];
this.handleReplacingLostTimes(sponsorTime.category, event.target.value as ActionType);
this.handleReplacingLostTimes(sponsorTime.category, event.target.value as ActionType, sponsorTime);
this.saveEditTimes();
}
private handleReplacingLostTimes(category: Category, actionType: ActionType): void {
private handleReplacingLostTimes(category: Category, actionType: ActionType, segment: SponsorTime): void {
if (CompileConfig.categorySupport[category]?.includes(ActionType.Poi)) {
if (this.previousSkipType !== ActionType.Poi) {
this.timesBeforeChanging = [null, utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[1])];
this.timesBeforeChanging = [null, segment.segment[1]];
}
this.setTimeTo(1, null);
@@ -410,12 +410,13 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
} else if (CompileConfig.categorySupport[category]?.length === 1
&& CompileConfig.categorySupport[category]?.[0] === ActionType.Full) {
if (this.previousSkipType !== ActionType.Full) {
this.timesBeforeChanging = [utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[0]), utils.getFormattedTimeToSeconds(this.state.sponsorTimeEdits[1])];
this.timesBeforeChanging = [...segment.segment];
}
this.previousSkipType = ActionType.Full;
} else if (CompileConfig.categorySupport[category]?.includes(ActionType.Skip)
&& ![ActionType.Poi, ActionType.Full].includes(this.getNextActionType(category, actionType)) && this.previousSkipType !== ActionType.Skip) {
} else if ((category === "chooseACategory" || (CompileConfig.categorySupport[category]?.includes(ActionType.Skip)
&& ![ActionType.Poi, ActionType.Full].includes(this.getNextActionType(category, actionType))))
&& this.previousSkipType !== ActionType.Skip) {
if (this.timesBeforeChanging[0]) {
this.setTimeTo(0, this.timesBeforeChanging[0]);
}

View File

@@ -16,7 +16,7 @@ import * as Chat from "./js-components/chat";
import { SkipButtonControlBar } from "./js-components/skipButtonControlBar";
import { getStartTimeFromUrl } from "./utils/urlParser";
import { findValidElement, getControls, getHashParams, isVisible } from "./utils/pageUtils";
import { keybindEquals } from "./utils/configUtils";
import { isSafari, keybindEquals } from "./utils/configUtils";
import { CategoryPill } from "./render/CategoryPill";
import { AnimationUtils } from "./utils/animationUtils";
import { GenericUtils } from "./utils/genericUtils";
@@ -529,7 +529,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
skippingFunction();
} else {
const delayTime = timeUntilSponsor * 1000 * (1 / video.playbackRate);
if (delayTime < 300 && utils.isFirefox()) {
if (delayTime < 300 && utils.isFirefox() && !isSafari()) {
// For Firefox, use interval instead of timeout near the end to combat imprecise video time
const startIntervalTime = performance.now();
const startVideoTime = video.currentTime;
@@ -756,7 +756,7 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) {
// Hide all submissions smaller than the minimum duration
if (Config.config.minDuration !== 0) {
for (const segment of sponsorTimes) {
const duration = segment[1] - segment[0];
const duration = segment.segment[1] - segment.segment[0];
if (duration > 0 && duration < Config.config.minDuration) {
segment.hidden = SponsorHideType.MinimumDuration;
}
@@ -1934,6 +1934,11 @@ async function sendSubmitMessage() {
sponsorTimesSubmitting = [];
updatePreviewBar();
const fullVideoSegment = sponsorTimes.filter((time) => time.actionType === ActionType.Full)[0];
if (fullVideoSegment) {
categoryPill?.setSegment(fullVideoSegment);
}
} else {
// Show that the upload failed
playerButtons.submit.button.style.animation = "unset";
@@ -1982,6 +1987,7 @@ function addPageListeners(): void {
function addHotkeyListener(): void {
document.addEventListener("keydown", hotkeyListener);
document.addEventListener("keyup", (e) => pressedKeys.delete(e.key));
document.addEventListener("focus", (e) => pressedKeys.clear());
}
function hotkeyListener(e: KeyboardEvent): void {

View File

@@ -5,6 +5,10 @@ export function showDonationLink(): boolean {
return navigator.vendor !== "Apple Computer, Inc." && Config.config.showDonationLink;
}
export function isSafari(): boolean {
return navigator.vendor === "Apple Computer, Inc.";
}
export function keybindEquals(first: Keybind, second: Keybind): boolean {
if (first == null || second == null ||
Boolean(first.alt) != Boolean(second.alt) || Boolean(first.ctrl) != Boolean(second.ctrl) || Boolean(first.shift) != Boolean(second.shift) ||