From 7283678821a1c550f717535ef04bb6aa05c4abb4 Mon Sep 17 00:00:00 2001
From: Sacha Chua <sacha@sachachua.com>
Date: Wed, 24 Nov 2021 02:06:58 -0500
Subject: Delay chapter list

---
 templates/page.tmpl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'templates')

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>
-- 
cgit v1.2.3