mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix View Video button and restore View Images button
This commit is contained in:
@@ -167,9 +167,12 @@
|
||||
<a href="#" id="view-waterfall" class="button" style="display: inline-block; padding: 0.75rem 1.5rem; background: var(--color-accent); color: white; text-decoration: none; border-radius: 8px; font-weight: 600; margin-right: 1rem;">
|
||||
📊 View Waterfall Chart
|
||||
</a>
|
||||
<a href="#" id="view-video" class="button" style="display: inline-block; padding: 0.75rem 1.5rem; background: var(--color-accent); color: white; text-decoration: none; border-radius: 8px; font-weight: 600;">
|
||||
<a href="#" id="view-video" class="button" style="display: inline-block; padding: 0.75rem 1.5rem; background: var(--color-accent); color: white; text-decoration: none; border-radius: 8px; font-weight: 600; margin-right: 1rem;">
|
||||
🎥 View Video
|
||||
</a>
|
||||
<a href="#" id="view-images" class="button" style="display: inline-block; padding: 0.75rem 1.5rem; background: var(--color-accent); color: white; text-decoration: none; border-radius: 8px; font-weight: 600;">
|
||||
🖼️ View Image Gallery
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Content Breakdown -->
|
||||
|
||||
17
main.js
17
main.js
@@ -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.');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user