diff --git a/scripts/content.js b/scripts/content.js index d2d80c4..010371f 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -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"]');