fix: trace page accepts route param (#/traces/HASH)

This commit is contained in:
you
2026-03-21 23:17:32 +00:00
parent 679f9a552f
commit 461fb7ee68
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -88,7 +88,7 @@
<script src="map.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="channels.js?v=1774331200" onerror="console.error('Failed to load:', this.src)"></script>
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="traces.js?v=1774350000" onerror="console.error('Failed to load:', this.src)"></script>
<script src="traces.js?v=1774135052" onerror="console.error('Failed to load:', this.src)"></script>
<script src="analytics.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="live.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
<script src="observers.js?v=1774290000" onerror="console.error('Failed to load:', this.src)"></script>
+3 -3
View File
@@ -5,10 +5,10 @@
let currentHash = null;
let traceData = [];
let packetMeta = null;
function init(app) {
// Check URL for pre-filled hash
function init(app, routeParam) {
// Check URL for pre-filled hash — support both route param and query param
const params = new URLSearchParams(location.hash.split('?')[1] || '');
const urlHash = params.get('hash') || '';
const urlHash = routeParam || params.get('hash') || '';
app.innerHTML = `
<div class="traces-page">