OAFRONT6 压缩长编号展示并修正视觉探针

这个提交包含在:
2026-05-25 19:58:23 +08:00
父节点 15db07a799
当前提交 971d5311e3
共修改 12 个文件,包含 249 行新增和 36 行删除
@@ -228,6 +228,11 @@ async function readMetrics(page: Page) {
text: (element.textContent ?? element.getAttribute("aria-label") ?? element.getAttribute("placeholder") ?? "").trim().slice(0, 40),
}));
const englishFound = englishTerms.filter((term) => text.includes(term));
const forbiddenPage =
window.location.pathname === "/403" ||
headings.some((heading) => /^(403|无权访问|权限不足)$/.test(heading)) ||
Array.from(document.querySelectorAll("[role='alert'],[data-testid='forbidden-page']"))
.some((element) => /^(403|无权访问|权限不足)/.test((element.textContent ?? "").trim()));
return {
title: document.title,
width,
@@ -243,7 +248,7 @@ async function readMetrics(page: Page) {
englishFound,
datePlaceholderCount: inputsWithDatePlaceholders,
clippedControls,
forbiddenLike: text.includes("无权访问") || text.includes("403") || text.includes("权限不足"),
forbiddenLike: forbiddenPage,
appErrorLike: text.includes("页面加载失败") || text.includes("加载失败") || text.includes("出错了"),
navPortalCopy: text.includes("Portal"),
};