summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2021-11-24 02:09:35 -0500
committerSacha Chua <sacha@sachachua.com>2021-11-24 02:09:35 -0500
commit8c386d06c34f665e0dc0d128a0c9f2d9a5c82a94 (patch)
treeca090b5899f329001a057ccfe8f413c15c9e8156
parent7283678821a1c550f717535ef04bb6aa05c4abb4 (diff)
downloademacsconf-wiki-8c386d06c34f665e0dc0d128a0c9f2d9a5c82a94.tar.xz
emacsconf-wiki-8c386d06c34f665e0dc0d128a0c9f2d9a5c82a94.zip
Let's try adding an event listener
-rw-r--r--templates/page.tmpl5
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index b0cafcd0..14c7fa40 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -353,9 +353,8 @@ transcriptDiv.appendChild(transcriptLink)
}
}
}
-document.addEventListener('DOMContentLoaded', function() {
- document.querySelectorAll('track[kind=chapters]').forEach(function(e) { displayChapters(e); });
-}, false);
+
+ document.querySelectorAll('track[kind=chapters]').forEach(function(e) { e.addEventListener('load', displayChapters); });
// @license-end
</script>
</body>