This commit is contained in:
Vladimir Carrer 2020-09-02 12:56:47 +02:00
parent 478a84cc0b
commit 0e9af137f5
2 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,10 @@ if (!program.url) {
console.log(program.url); console.log(program.url);
console.log(program.fullPage); console.log(program.fullPage);
const deviceName = puppeteer.devices[program.emulate];
(async () => { (async () => {
try { try {
await execute(); await execute();
@ -67,7 +71,7 @@ console.log(program.fullPage);
await page.emulateVisionDeficiency(program.vd); await page.emulateVisionDeficiency(program.vd);
} }
if (program.emulate) if (program.emulate)
await page.emulate(devices[program.emulate]); await page.emulate(deviceName);
else else
program.emulate = ''; program.emulate = '';

View File

@ -1,6 +1,6 @@
{ {
"name": "screenshoteer", "name": "screenshoteer",
"version": "1.1.0", "version": "1.1.1",
"description": "Make screenshots and device emulations form your terminal", "description": "Make screenshots and device emulations form your terminal",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {