From fbc33ffcaf64ffc09175eafd0e998798432fcc99 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Thu, 20 Oct 2022 21:20:15 +0200 Subject: [PATCH] same resolution for docker as for browser --- Dockerfile | 4 ++-- epic-games.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5fd0b7e..cd652f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,8 +66,8 @@ EXPOSE 5900 EXPOSE 6080 # Configure Xvfb via environment variables: -ENV SCREEN_WIDTH 1440 -ENV SCREEN_HEIGHT 900 +ENV SCREEN_WIDTH 1280 +ENV SCREEN_HEIGHT 1280 ENV SCREEN_DEPTH 24 ENTRYPOINT ["entrypoint"] diff --git a/epic-games.js b/epic-games.js index 6de53be..30cec9d 100644 --- a/epic-games.js +++ b/epic-games.js @@ -13,7 +13,7 @@ const debug = process.env.PWDEBUG == '1'; // runs non-headless and opens https:/ const URL_CLAIM = 'https://store.epicgames.com/en-US/free-games'; const URL_LOGIN = 'https://www.epicgames.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=' + URL_CLAIM; const TIMEOUT = 20 * 1000; // 20s, default is 30s -const SCREEN_WIDTH = Number(process.env.SCREEN_WIDTH) - 80 || 1280; +const SCREEN_WIDTH = Number(process.env.SCREEN_WIDTH) || 1280; const SCREEN_HEIGHT = Number(process.env.SCREEN_HEIGHT) || 1280; const db = await jsonDb('epic-games.json');