Browse Source

gen-screenshot: stop subtracting 16 px from width

It looks like some update to my system fixed it.
dev
D. Bohdan 1 year ago
parent
commit
2d9b1023cf
  1. 4
      gen-screenshot.ts

4
gen-screenshot.ts

@ -15,10 +15,8 @@ const slugify = (str: string) =>
.replace(/(^-|-$)/g, "");
const saveScreenshot = async (src: string, dest: string) => {
// For whatever reason, I get screenshots 16 pixels wider than the requested
// viewport size.
const browser = await puppeteer.launch({
defaultViewport: { width: 1024 - 16, height: 1024, deviceScaleFactor: 1 },
defaultViewport: { width: 1024, height: 1024, deviceScaleFactor: 1 },
});
const page = await browser.newPage();

Loading…
Cancel
Save