summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2021-01-27 00:53:29 -0500
committerSacha Chua <sacha@sachachua.com>2021-01-27 00:53:29 -0500
commit6de4c373099fc24100fe8bcfd63d2677f4018035 (patch)
treec4f8470f71395ef2c1b29093b91a6f08dae9b609 /templates
parente4be70d7e30b403f480e23917f923fb9222c45d1 (diff)
downloademacsconf-wiki-6de4c373099fc24100fe8bcfd63d2677f4018035.tar.xz
emacsconf-wiki-6de4c373099fc24100fe8bcfd63d2677f4018035.zip
Try subtitle
Diffstat (limited to 'templates')
-rw-r--r--templates/page.tmpl9
-rw-r--r--templates/subtitle.tmpl (renamed from templates/subtitle.md)0
2 files changed, 4 insertions, 5 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 576f3d66..44b6a957 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -69,12 +69,11 @@
let qnaVideo; // some pages have a questions and answers video
let timestamps;
- // expects a string like "mm:ss"
+ // expects a string like "mm:ss.mmm"
function parseSeconds(timeString) {
- const times = timeString.split(":");
- const minutes = parseFloat(times[0]);
- const seconds = parseFloat(times[1]);
- return (minutes * 60) + seconds;
+ return timeString.split(":").reduce(function(prev, o) {
+ return prev * 60 + parseFloat(o);
+ });
}
window.onload = function initScript() {
diff --git a/templates/subtitle.md b/templates/subtitle.tmpl
index dcd6971e..dcd6971e 100644
--- a/templates/subtitle.md
+++ b/templates/subtitle.tmpl