Close modal warning on signin page
This commit is contained in:
parent
f580244a5d
commit
f66c6ecbf9
@ -197,6 +197,18 @@ async function goToDashboardPage() {
|
||||
}
|
||||
|
||||
async function enterCredentials(username, password) {
|
||||
// close warning modal
|
||||
let modalElement = Array.from(document.querySelectorAll('div'))
|
||||
.find(d => d.textContent.includes('You need to sign in or sign up before continuing.'));
|
||||
if (modalElement && window.getComputedStyle(modalElement).display !== 'none') {
|
||||
let buttons = Array.from(modalElement.querySelectorAll('button'));
|
||||
let okButton = buttons.find(b => b.textContent === 'OK');
|
||||
if (okButton) {
|
||||
okButton.click();
|
||||
await delay(PAGE_WAIT_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("user_email").value = username;
|
||||
document.getElementById("user_password").value = password;
|
||||
let policyConfirmed = document.querySelector('[for="policy_confirmed"]');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user