summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-16 10:54:29 -0500
committerSacha Chua <sacha@sachachua.com>2022-11-16 10:54:29 -0500
commit17cacbca1ac3c773191cbcfcf95086a2f63958b4 (patch)
treeefa34e46b04ae4922aaf0441358e2902131d2eee
parent22ea5b8fcb1afe0d9c6d337b7fe1d02685ec7413 (diff)
downloademacsconf-wiki-17cacbca1ac3c773191cbcfcf95086a2f63958b4.tar.xz
emacsconf-wiki-17cacbca1ac3c773191cbcfcf95086a2f63958b4.zip
Use milliseconds, but don't show them
-rw-r--r--templates/page.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 0ee9e811..dd6ac641 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -348,7 +348,7 @@ transcriptDiv.appendChild(transcriptLink)
track.mode = 'hidden';
}
var chapters = elem.textContent.split(/[ \t]*\n+[ \t]*/).forEach(function(line) {
- var m = (line.match(/^(([0-9]+:)?[0-9]+:[0-9]+)[ \t]+(.*)/));
+ var m = (line.match(/^(((?:[0-9]+:)?[0-9]+:[0-9]+)(?:\.[0-9]+))[ \t]+(.*)/));
if (m) {
var start = m[1];
var text = m[3];
@@ -358,7 +358,7 @@ transcriptDiv.appendChild(transcriptLink)
link.setAttribute('data-video', target);
link.setAttribute('data-start', start);
link.setAttribute('data-start-s', parseSeconds(start));
- link.appendChild(document.createTextNode(m[1] + ' ' + text));
+ link.appendChild(document.createTextNode(m[2] + ' ' + text));
link.onclick = handleSubtitleClick;
chapter.appendChild(link);
list.appendChild(chapter);