Format and lint
This commit is contained in:
parent
42ee2d4c51
commit
04a78e7bfe
75 changed files with 1290 additions and 719 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue