From 9a65e68e69482e3805f0a1ef1394f3a53e981cb3 Mon Sep 17 00:00:00 2001 From: Dominik Peters Date: Mon, 27 Nov 2023 12:17:31 +0100 Subject: [PATCH] fix current line highlighting --- src/ChapterListEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChapterListEditor.js b/src/ChapterListEditor.js index b08547c..f376b71 100644 --- a/src/ChapterListEditor.js +++ b/src/ChapterListEditor.js @@ -234,7 +234,7 @@ export function adjustTextAreaHeight() { export function highlightCurrentLine() { const lines = document.getElementsByClassName('line'); for (let line of lines) { - if (line.dataset.start <= window.currentTime && window.currentTime < line.dataset.end) { + if (line.dataset.start <= window.currentTime * 1000 && window.currentTime * 1000 < line.dataset.end) { line.classList.add('current-line'); } else { line.classList.remove('current-line');