mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix device selection default mismatch + Integrate Waterfall & Comparison
Bug Fix: - Backend was defaulting to mobile (isMobile ?? true) - Frontend was defaulting to desktop - Changed runner.js default to false (desktop) to match frontend Feature Integration: - Added Waterfall button to each history item - Added comparison checkboxes to history for easy test selection - Auto-limit to 2 tests for comparison - Comparison controls appear dynamically when tests selected - Auto-load comparison when URL params present
This commit is contained in:
13
compare.html
13
compare.html
@@ -85,6 +85,19 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Auto-load comparison from URL parameters
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const test1 = params.get('test1');
|
||||
const test2 = params.get('test2');
|
||||
|
||||
if (test1 && test2) {
|
||||
document.getElementById('test1-id').value = test1;
|
||||
document.getElementById('test2-id').value = test2;
|
||||
document.getElementById('compare-btn').click();
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('compare-btn').addEventListener('click', async () => {
|
||||
const test1Id = document.getElementById('test1-id').value.trim();
|
||||
const test2Id = document.getElementById('test2-id').value.trim();
|
||||
|
||||
Reference in New Issue
Block a user