From c74633af67e28a339c71cb015e031eb543f4307c Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 5 Jan 2024 02:18:26 +0100 Subject: implement clear all clip action --- app.js | 5 ++++- index.html | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index ad5dcb0..719b6ed 100644 --- a/app.js +++ b/app.js @@ -11,6 +11,10 @@ const autoplayCheckbox = document.querySelector("#autoplay"); const clearBtn = document.querySelector("#clear"); const clips = document.querySelector("#clips"); +clearBtn.addEventListener("click", _event => { + clips.textContent = ""; +}); + function stopPlayer(player) { player.pause(); player.currentTime = 0; @@ -61,7 +65,6 @@ function onGetDeviceSuccess(stream) { const audioElement = makeExclusive(audioElementForBlob(blob)); // TODO: record blob and list to local persistent storage - // TODO: "clear all" button to clear all clips // TODO: buttons to clear individual clips // TODO: keyboard shortcut to play clips for the ten last indexes diff --git a/index.html b/index.html index 621dc4d..a0df0ca 100644 --- a/index.html +++ b/index.html @@ -58,8 +58,7 @@ -
    -
+
    -- cgit v1.2.3