feat: 新增 isSignupEntryHost 函数以支持 chatgpt.com 和 chat.openai.com 的注册页面识别,更新相关测试用例

This commit is contained in:
QLHazyCoder
2026-04-16 20:21:03 +08:00
parent f2f198f55d
commit 439268b4b7
5 changed files with 222 additions and 2 deletions
+5 -1
View File
@@ -3210,6 +3210,10 @@ function isSignupPageHost(hostname = '') {
return ['auth0.openai.com', 'auth.openai.com', 'accounts.openai.com'].includes(hostname);
}
function isSignupEntryHost(hostname = '') {
return ['chatgpt.com', 'chat.openai.com'].includes(hostname);
}
function isSignupPasswordPageUrl(rawUrl) {
const parsed = parseUrlSafely(rawUrl);
if (!parsed) return false;
@@ -3261,7 +3265,7 @@ function matchesSourceUrlFamily(source, candidateUrl, referenceUrl) {
switch (source) {
case 'signup-page':
return isSignupPageHost(candidate.hostname);
return isSignupPageHost(candidate.hostname) || isSignupEntryHost(candidate.hostname);
case 'duck-mail':
return candidate.hostname === 'duckduckgo.com' && candidate.pathname.startsWith('/email/');
case 'qq-mail':