Format and lint

This commit is contained in:
Andras Schmelczer 2026-02-08 12:37:07 +00:00
parent 42ee2d4c51
commit 04a78e7bfe
75 changed files with 1290 additions and 719 deletions

View file

@ -132,7 +132,7 @@ export async function takeScreenshot(url: string): Promise<Buffer> {
});
try {
// Use domcontentloaded instead of networkidle - let __og_ready handle readiness
// Use domcontentloaded instead of networkidle - let __screenshot_ready handle readiness
const response = await page.goto(url, {
waitUntil: 'domcontentloaded',
timeout: NAVIGATION_TIMEOUT,
@ -143,12 +143,12 @@ export async function takeScreenshot(url: string): Promise<Buffer> {
// Wait for the frontend to signal readiness
try {
await page.waitForFunction('window.__og_ready === true', {
await page.waitForFunction('window.__screenshot_ready === true', {
timeout: NAVIGATION_TIMEOUT,
});
console.log('Frontend signalled ready');
} catch {
console.warn('Timed out waiting for __og_ready, proceeding with partial screenshot');
console.warn('Timed out waiting for __screenshot_ready, proceeding with partial screenshot');
}
// Extra buffer for map tiles to finish rendering