From 9fc20c973b1ef82845ce9db51e16270547d822d4 Mon Sep 17 00:00:00 2001 From: JulienMaille <182520+JulienMaille@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:37:16 +0000 Subject: [PATCH] style: auto-fix linting issues --- js/events.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/js/events.js b/js/events.js index 1dea389..35e70e0 100644 --- a/js/events.js +++ b/js/events.js @@ -317,10 +317,10 @@ function initializeSmoothSliders(audioPlayer, player) { const updateSeekUI = (position) => { if (!isNaN(audioPlayer.duration)) { - progressFill.style.width = `${position * 100}%`; - if (currentTimeEl) { - currentTimeEl.textContent = formatTime(position * audioPlayer.duration); - } + progressFill.style.width = `${position * 100}%`; + if (currentTimeEl) { + currentTimeEl.textContent = formatTime(position * audioPlayer.duration); + } } }; @@ -346,7 +346,7 @@ function initializeSmoothSliders(audioPlayer, player) { const touch = e.touches[0]; const rect = progressBar.getBoundingClientRect(); const position = Math.max(0, Math.min(1, (touch.clientX - rect.left) / rect.width)); - + lastSeekPosition = position; updateSeekUI(position); }); @@ -377,7 +377,7 @@ function initializeSmoothSliders(audioPlayer, player) { const touch = e.touches[0]; const rect = progressBar.getBoundingClientRect(); const position = Math.max(0, Math.min(1, (touch.clientX - rect.left) / rect.width)); - + lastSeekPosition = position; updateSeekUI(position); } @@ -428,7 +428,8 @@ function initializeSmoothSliders(audioPlayer, player) { }); progressBar.addEventListener('click', (e) => { - if (!isSeeking) { // Only handle click if not result of a drag release + if (!isSeeking) { + // Only handle click if not result of a drag release seek(progressBar, e, (position) => { if (!isNaN(audioPlayer.duration) && audioPlayer.duration > 0 && audioPlayer.duration !== Infinity) { audioPlayer.currentTime = position * audioPlayer.duration;