From 87f107fe5d2026e472f10a7e3927153bcf65e13d Mon Sep 17 00:00:00 2001 From: Toil <62353659+ilyhalight@users.noreply.github.com> Date: Mon, 26 Aug 2024 00:09:43 +0300 Subject: [PATCH] renamed repeat variable --- dist/vot.user.js | 6 +++--- src/subtitles.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/vot.user.js b/dist/vot.user.js index cbc3abff..d6c74b3b 100644 --- a/dist/vot.user.js +++ b/dist/vot.user.js @@ -5486,8 +5486,8 @@ function formatYoutubeSubtitles(subtitles, isAsr = false) { const tokens = []; let lastSegDuration = durationMs; - for (let i = 0; i < subtitle.segs.length; i++) { - const seg = subtitle.segs[i]; + for (let j = 0; j < subtitle.segs.length; j++) { + const seg = subtitle.segs[j]; const text = seg.utf8.trim(); if (text === "\n") { continue; @@ -5495,7 +5495,7 @@ function formatYoutubeSubtitles(subtitles, isAsr = false) { const offset = seg.tOffsetMs ?? 0; let segDuration = durationMs; - const nextSeg = subtitle.segs[i + 1]; + const nextSeg = subtitle.segs[j + 1]; if (nextSeg?.tOffsetMs) { segDuration = nextSeg.tOffsetMs - offset; lastSegDuration -= segDuration; diff --git a/src/subtitles.js b/src/subtitles.js index 6af33319..668a6e67 100644 --- a/src/subtitles.js +++ b/src/subtitles.js @@ -118,8 +118,8 @@ function formatYoutubeSubtitles(subtitles, isAsr = false) { const tokens = []; let lastSegDuration = durationMs; - for (let i = 0; i < subtitle.segs.length; i++) { - const seg = subtitle.segs[i]; + for (let j = 0; j < subtitle.segs.length; j++) { + const seg = subtitle.segs[j]; const text = seg.utf8.trim(); if (text === "\n") { continue; @@ -127,7 +127,7 @@ function formatYoutubeSubtitles(subtitles, isAsr = false) { const offset = seg.tOffsetMs ?? 0; let segDuration = durationMs; - const nextSeg = subtitle.segs[i + 1]; + const nextSeg = subtitle.segs[j + 1]; if (nextSeg?.tOffsetMs) { segDuration = nextSeg.tOffsetMs - offset; lastSegDuration -= segDuration;