update puppeteer to version 8.0.0

space thumbnails use background-size: cover
This commit is contained in:
dm
2021-03-23 23:57:16 +01:00
parent 6bd7130597
commit 84081876e4
4 changed files with 87 additions and 62 deletions

View File

@@ -36,7 +36,7 @@ module.exports = {
page.setDefaultTimeout(timeout);
await page.setJavaScriptEnabled(false);
await page.goto(space_url, {waitUntil: 'networkidle2'});
await page.emulateMedia('screen');
await page.emulateMediaType('screen');
if (type=="pdf") {
await page.pdf({path: export_path, printBackground: true, width: space.width+'px', height: space.height+'px' });