From 43840576eaca5b3ff9a9c61996e274b2143a665c Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Sun, 19 Mar 2023 16:44:17 +0300 Subject: [PATCH] Add selectall checkbox --- www/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/index.html b/www/index.html index 9746f752..7b4e3556 100644 --- a/www/index.html +++ b/www/index.html @@ -73,7 +73,7 @@ - + @@ -117,6 +117,12 @@ fetch(url, {method: "DELETE"}).then(reload); }); + document.getElementById('selectall').addEventListener('change', ev => { + document.querySelectorAll('#streams input').forEach(el => { + el.checked = ev.target.checked + }) + }) + function reload() { const url = new URL("api/streams", location.href); fetch(url, {cache: 'no-cache'}).then(r => r.json()).then(data => {
NameName Online Commands