Update index.js
Browse files
index.js
CHANGED
@@ -92,7 +92,7 @@ async function processScreenshot(req, res, { ua, url, type, width, height, langu
|
|
92 |
if (!browserContext) {
|
93 |
browserContext = await browser.newContext({
|
94 |
userAgent: ua || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
|
95 |
-
viewport: { width: width || 1280, height: height || 800 },
|
96 |
deviceScaleFactor: 2
|
97 |
});
|
98 |
}
|
|
|
92 |
if (!browserContext) {
|
93 |
browserContext = await browser.newContext({
|
94 |
userAgent: ua || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
|
95 |
+
viewport: { width: Number(width) || 1280, height: Number(height) || 800 },
|
96 |
deviceScaleFactor: 2
|
97 |
});
|
98 |
}
|