From 17cacbca1ac3c773191cbcfcf95086a2f63958b4 Mon Sep 17 00:00:00 2001
From: Sacha Chua <sacha@sachachua.com>
Date: Wed, 16 Nov 2022 10:54:29 -0500
Subject: Use milliseconds, but don't show them

---
 templates/page.tmpl | 4 ++--
 1 file 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);
-- 
cgit v1.2.3