summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);