strix

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

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

Push events onto browser history

Diffstat:
Msrc/strix/ui/events.html | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/strix/ui/events.html b/src/strix/ui/events.html @@ -94,6 +94,11 @@ function get_all_events(camera_name) { } function load_viewer(event, scrollY) { + // Update the browser history and url with the new event + let params = new URLSearchParams(document.location.search); + params.set("event", event); + window.history.pushState({}, document.title, "?"+params.toString()); + scroll(0,0); // Set the viewere to the event video