chore: make version banner configurable and speed up login waits
This commit is contained in:
parent
34e8d92b05
commit
133502ff94
4 changed files with 13 additions and 4 deletions
5
gog.js
5
gog.js
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue