From d9b7471845e516061e9b8616ed9cd08c8133e379 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Tue, 17 Aug 2021 15:04:28 +0200 Subject: [PATCH 1/2] 55 remove class='active' --- js/hyperaudio-lite.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/hyperaudio-lite.js b/js/hyperaudio-lite.js index 5414512..8d04039 100644 --- a/js/hyperaudio-lite.js +++ b/js/hyperaudio-lite.js @@ -246,6 +246,13 @@ class HyperaudioLite { setPlayHead = e => { const target = e.target ? e.target : e.srcElement; + + let activeElements = Array.from(this.transcript.getElementsByClassName('active')); + + activeElements.forEach(e => { + e.classList.remove('active'); + }); + target.setAttribute('class', 'active'); const timeSecs = parseInt(target.getAttribute('data-m')) / 1000; From e924c2f2d2e0787a2cb4ef97a7bf890648dc1756 Mon Sep 17 00:00:00 2001 From: Mark Boas Date: Tue, 17 Aug 2021 15:05:37 +0200 Subject: [PATCH 2/2] 55 bump version number --- js/hyperaudio-lite.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/hyperaudio-lite.js b/js/hyperaudio-lite.js index 8d04039..bc9567a 100644 --- a/js/hyperaudio-lite.js +++ b/js/hyperaudio-lite.js @@ -1,5 +1,5 @@ /*! (C) The Hyperaudio Project. MIT @license: en.wikipedia.org/wiki/MIT_License. */ -/*! Version 2.0.0 */ +/*! Version 2.0.1 */ 'use strict';