Skip to content

Instantly share code, notes, and snippets.

View janumedia's full-sized avatar
:octocat:
Hire me

Januartha janumedia

:octocat:
Hire me
View GitHub Profile
@janumedia
janumedia / get-lazyimages-screenshot.js
Created October 12, 2018 08:18
Get Lazy Images Screenshot Page with Puppeteer
const helper = require('./puppeteer-helper');
(async() => {
const {browser, page} = await helper({deviceName:'iPhone 6'});
const pageHeight = await page.evaluate(() => {
const body = document.body;
const html = document.documentElement;
return Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
});