Skip to content

Commit

Permalink
fix current line highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikPeters committed Nov 27, 2023
1 parent 255a7c8 commit 9a65e68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChapterListEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 9a65e68

Please sign in to comment.