From feacb963451fffb8b53a923bfe992ac63b0dcac5 Mon Sep 17 00:00:00 2001 From: halliday Date: Tue, 6 May 2025 20:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Drobotid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 2 +- src/chrome/content/content.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7152424..7ef4f1c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "type": "chrome", "request": "launch", "url": "file://${workspaceFolder}/test/deepseek_html_20250425_ef9a56.html", - "webRoot": "${workspaceFolder}", + "webRoot": "${workspaceFolder}/src//chrome", "runtimeExecutable": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "userDataDir": "${workspaceFolder}/.chrome-debug", "runtimeArgs": [ diff --git a/src/chrome/content/content.js b/src/chrome/content/content.js index 71312da..24e315b 100644 --- a/src/chrome/content/content.js +++ b/src/chrome/content/content.js @@ -1300,6 +1300,12 @@ function addAllXpathAttributesBbased(attribute, tagName, element) { xpathArray.push([1, 'Id is unique:', id]) } ; break; + case 'robotid': + let robotid = item.value + if (robotid != null) { + xpathArray.push([1, 'RobotId is unique:', robotid]) + } + ; break; case 'class': let className = getClassBasedXpath(element, tagName) if (className != null) {