Fix View Video button and restore View Images button

This commit is contained in:
2025-12-28 11:02:33 +11:00
parent 0419bd6a9e
commit 7dba6a8183
2 changed files with 20 additions and 2 deletions

17
main.js
View File

@@ -163,7 +163,22 @@ function displayResults(data) {
};
document.getElementById('view-video').onclick = (e) => {
e.preventDefault();
openVideoModal(data.filmstrip);
if (data.filmstrip && data.filmstrip.length > 0) {
openVideoModal(data.filmstrip);
} else {
alert('No video data available for this test.');
}
};
document.getElementById('view-images').onclick = (e) => {
e.preventDefault();
if (data.filmstrip && data.filmstrip.length > 0) {
// Open images.html?id=... (Assuming logic exists, user requested it back)
// Or reusing filmstrip display? User said "View Images function".
// Checking previous code: it opened `/images.html?id=${data.id}`
window.open(`/images.html?id=${data.id}`, '_blank');
} else {
alert('No images available.');
}
};
}