Update transcript-tracer.js
Browse files- transcript-tracer.js +22 -9
transcript-tracer.js
CHANGED
@@ -589,16 +589,29 @@ function handleSelection() {
|
|
589 |
console.log(temp);
|
590 |
|
591 |
// Mark selection
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
601 |
// }
|
|
|
602 |
|
603 |
}
|
604 |
|
|
|
589 |
console.log(temp);
|
590 |
|
591 |
// Mark selection
|
592 |
+
|
593 |
+
var currentWordElement = startWordElement;
|
594 |
+
while (true) {
|
595 |
+
var isWhite = currentWordElement.className == "tt-whitespace";
|
596 |
+
var index = -1;
|
597 |
+
if (!isWhite) {
|
598 |
+
var index = currentWordElement.dataset.ttWord;
|
599 |
+
}
|
600 |
+
if (parseInt(index) > parseInt(endWordIndex)) {
|
601 |
+
break;
|
602 |
+
}
|
603 |
+
console.log(currentWordElement);
|
604 |
+
currentWordElement = currentWordElement.nextElementSibling;
|
605 |
+
|
606 |
+
// var wordElements = ttCurrentTranscript.querySelectorAll(`[data-tt-word="${wordIndex}"]`);
|
607 |
+
// for (const wordElement of wordElements) wordElement.classList.add('tt-current-word');
|
608 |
+
}
|
609 |
+
|
610 |
+
// for (const wordElement of ttCurrentTranscript.getElementsByClassName('tt-word')) {
|
611 |
+
// if (wordElement.classList.contains('tt-current-word')) break;
|
612 |
+
// wordElement.classList.add('tt-previous-word');
|
613 |
// }
|
614 |
+
|
615 |
|
616 |
}
|
617 |
|