strix

A simple web UI for motion
git clone https://www.brianlane.com/git/strix
Log | Files | Refs | LICENSE

commit d4e5da80cf90b0f50bfc58e0ee9a91681ce12329
parent 3a06fd0edd530acdd26dc3ec4ca129dea7ec5ace
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Sat, 25 Jun 2022 08:24:08 -0700

Make debug button a toggle

Diffstat:
Msrc/strix/ui/events.html | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/strix/ui/events.html b/src/strix/ui/events.html @@ -113,7 +113,12 @@ function load_viewer(event, scrollY) { // Setup the debug link var dbg = document.querySelector("#debugvideo"); dbg.onclick = function() { - viewer.src = viewer.src.replace("video.m4v", "debug/video.m4v"); + // Toggle between debug and normal view + if (viewer.src.includes("debug/video.m4v")) { + viewer.src = viewer.src.replace("debug/video.m4v", "video.m4v"); + } else { + viewer.src = viewer.src.replace("video.m4v", "debug/video.m4v"); + } }; }