chore: make version banner configurable and speed up login waits
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m10s

This commit is contained in:
nocci 2025-12-31 11:58:35 +00:00
parent 34e8d92b05
commit 133502ff94
4 changed files with 13 additions and 4 deletions

5
gog.js
View file

@ -42,7 +42,10 @@ try {
await page.goto(URL_CLAIM, { waitUntil: 'domcontentloaded' }); // default 'load' takes forever
const signIn = page.locator('a:has-text("Sign in")').first();
await Promise.any([signIn.waitFor(), page.waitForSelector('#menuUsername')]);
await Promise.any([
signIn.waitFor({ timeout: cfg.login_visible_timeout }),
page.waitForSelector('#menuUsername', { timeout: cfg.login_visible_timeout }),
]).catch(() => {});
while (await signIn.isVisible()) {
console.error('Not signed in anymore.');
await signIn.click();