| 822 | const fetches = (await page.evaluate(() => window.__probeFetches.slice())) |
| 823 | .filter((entry) => entry.t >= from && new URLSearchParams(entry.page).get('project') === shown && !/\/api\/ui-log/.test(entry.url)); |
| 824 | const names = (entry) => { |
| 825 | const named = new Set(); |
| 826 | try { const value = new URL(entry.url, location.href).searchParams.get('project'); if (value) named.add(value); } catch { /* not a URL */ } |
| 827 | for (const match of entry.body.matchAll(/"(?:project|project_name)"\s*:\s*"([^"]+)"/g)) named.add(match[1]); |
| 828 | return named; |
| 829 | }; |
| 830 | return { total: fetches.length, naming: fetches.filter((entry) => names(entry).has(project)).map((entry) => ({ t: entry.t, url: entry.url.slice(0, 120), body: entry.body.slice(0, 160), page: entry.page })) }; |
| 831 | } |
| 832 | const lampFrames = async (page, label, t0) => { |