summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index ceaa1049..b0cafcd0 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -353,7 +353,9 @@ transcriptDiv.appendChild(transcriptLink)
}
}
}
-document.querySelectorAll('track[kind=chapters]').forEach(function(e) { displayChapters(e); });
+document.addEventListener('DOMContentLoaded', function() {
+ document.querySelectorAll('track[kind=chapters]').forEach(function(e) { displayChapters(e); });
+}, false);
// @license-end
</script>
</body>