gog: only unsubscribe from newsletter if a game was claimed?
This commit is contained in:
parent
11a28f0c73
commit
d3e4c58c80
1 changed files with 5 additions and 3 deletions
8
gog.js
8
gog.js
|
|
@ -122,9 +122,11 @@ try {
|
||||||
db.data[user][title].status ||= status;
|
db.data[user][title].status ||= status;
|
||||||
notify_games.push({ title, url, status });
|
notify_games.push({ title, url, status });
|
||||||
|
|
||||||
console.log("Unsubscribe from 'Promotions and hot deals' newsletter");
|
if (status == 'claimed') { // TODO check if this is enough or if newsleter is enabled if 'existed'
|
||||||
await page.goto('https://www.gog.com/en/account/settings/subscriptions');
|
console.log("Unsubscribe from 'Promotions and hot deals' newsletter");
|
||||||
await page.locator('li:has-text("Promotions and hot deals") label').uncheck();
|
await page.goto('https://www.gog.com/en/account/settings/subscriptions');
|
||||||
|
await page.locator('li:has-text("Promotions and hot deals") label').uncheck();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error); // .toString()?
|
console.error(error); // .toString()?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue