diff --git a/epic-games.js b/epic-games.js index 1a2b602..2644c40 100644 --- a/epic-games.js +++ b/epic-games.js @@ -41,8 +41,10 @@ await stealth(context); if (!cfg.debug) context.setDefaultTimeout(cfg.timeout); const page = context.pages().length ? context.pages()[0] : await context.newPage(); // should always exist + +// some debug info about the page (screen dimensions, user agent, platform) // eslint-disable-next-line no-undef -if (cfg.debug) console.debug(await page.evaluate(() => [window.screen, navigator.userAgent, navigator.platform])); +if (cfg.debug) console.debug(await page.evaluate(() => [(({ width, height, availWidth, availHeight }) => ({ width, height, availWidth, availHeight }))(window.screen), navigator.userAgent, navigator.platform, navigator.vendor])); // deconstruct screen needed since `window.screen` prints {}, `window.screen.toString()` '[object Screen]', and can't use some pick function without defining it on `page` if (cfg.debug_network) { // const filter = _ => true; const filter = r => r.url().includes('store.epicgames.com');