From d55aeee331ec03286bb76fbda2fe4a4e450508a6 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 24 Nov 2021 02:12:02 -0500 Subject: Let's try the event listener again --- templates/page.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/page.tmpl') diff --git a/templates/page.tmpl b/templates/page.tmpl index a29d8531..4683c137 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -354,8 +354,8 @@ transcriptDiv.appendChild(transcriptLink) } } - document.querySelectorAll('track[kind=chapters]').forEach(function(e) { - e.setAttribute(onLoad, 'displayChapters(this)'); }); + document.querySelectorAll('track[kind=chapters]').forEach(function(e) { e.addEventListener('load', function() { displayChapters(e); });}); + // @license-end -- cgit v1.2.3