From a3453eaeaf6126ef3885dd4ad6d5635d41451512 Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Thu, 9 Apr 2026 23:29:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E9=A1=B5=E9=9D=A2=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=8F=8A=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=AA=8C=E8=AF=81=E7=A0=81=E8=BE=93=E5=85=A5=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/signup-page.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/signup-page.js b/content/signup-page.js index 3a64135..7fe1f0d 100644 --- a/content/signup-page.js +++ b/content/signup-page.js @@ -166,6 +166,10 @@ function findResendVerificationCodeTrigger({ allowDisabled = false } = {}) { return null; } +function isEmailVerificationPage() { + return /\/email-verification(?:[/?#]|$)/i.test(location.pathname || ''); +} + async function prepareLoginCodeFlow(timeout = 15000) { const readyTarget = getVerificationCodeTarget(); if (readyTarget) { @@ -173,10 +177,16 @@ async function prepareLoginCodeFlow(timeout = 15000) { return { ready: true, mode: readyTarget.type }; } + if (isEmailVerificationPage() && isVerificationPageStillVisible()) { + log('步骤 7:已进入邮箱验证码页面,正在等待验证码输入框或重发入口稳定。'); + return { ready: true, mode: 'verification_page' }; + } + const start = Date.now(); let switchClickCount = 0; let lastSwitchAttemptAt = 0; let loggedPasswordPage = false; + let loggedVerificationPage = false; while (Date.now() - start < timeout) { throwIfStopped(); @@ -187,6 +197,15 @@ async function prepareLoginCodeFlow(timeout = 15000) { return { ready: true, mode: target.type }; } + if (isEmailVerificationPage() && isVerificationPageStillVisible()) { + if (!loggedVerificationPage) { + loggedVerificationPage = true; + log('步骤 7:页面已进入邮箱验证码流程,继续等待验证码输入框渲染...'); + } + await sleep(250); + continue; + } + const passwordInput = document.querySelector('input[type="password"]'); const switchTrigger = findOneTimeCodeLoginTrigger();