auto-webmcp 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-webmcp.cjs.js +10 -8
- package/dist/auto-webmcp.cjs.js.map +2 -2
- package/dist/auto-webmcp.esm.js +10 -8
- package/dist/auto-webmcp.esm.js.map +2 -2
- package/dist/auto-webmcp.iife.js +1 -1
- package/dist/auto-webmcp.iife.js.map +2 -2
- package/dist/discovery.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/auto-webmcp.esm.js
CHANGED
|
@@ -1671,21 +1671,23 @@ async function scanOrphanInputs(config) {
|
|
|
1671
1671
|
console.log(`[auto-webmcp] orphan: using disabled submit button as reference: "${submitBtn.textContent?.trim()}"`);
|
|
1672
1672
|
}
|
|
1673
1673
|
if (!submitBtn) {
|
|
1674
|
-
const containerBtns = Array.from(
|
|
1674
|
+
const containerBtns = Array.from(
|
|
1675
|
+
container.querySelectorAll('button, [role="button"]')
|
|
1676
|
+
).filter((b) => {
|
|
1675
1677
|
const r = b.getBoundingClientRect();
|
|
1676
|
-
return r.width > 0 && r.height > 0 && !b.disabled && SUBMIT_TEXT_RE.test(b.textContent ?? "");
|
|
1678
|
+
return r.width > 0 && r.height > 0 && !b.disabled && b.getAttribute("aria-disabled") !== "true" && SUBMIT_TEXT_RE.test(b.textContent ?? "");
|
|
1677
1679
|
});
|
|
1678
1680
|
submitBtn = containerBtns[containerBtns.length - 1] ?? null;
|
|
1679
1681
|
if (submitBtn)
|
|
1680
1682
|
console.log(`[auto-webmcp] orphan: using text-matched button in container: "${submitBtn.textContent?.trim()}"`);
|
|
1681
1683
|
}
|
|
1682
1684
|
if (!submitBtn) {
|
|
1683
|
-
const pageBtns = Array.from(
|
|
1684
|
-
(
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
);
|
|
1685
|
+
const pageBtns = Array.from(
|
|
1686
|
+
document.querySelectorAll('button, [role="button"]')
|
|
1687
|
+
).filter((b) => {
|
|
1688
|
+
const r = b.getBoundingClientRect();
|
|
1689
|
+
return r.width > 0 && r.height > 0 && b.getAttribute("aria-disabled") !== "true" && SUBMIT_TEXT_RE.test(b.textContent ?? "");
|
|
1690
|
+
});
|
|
1689
1691
|
submitBtn = pageBtns[pageBtns.length - 1] ?? null;
|
|
1690
1692
|
if (submitBtn)
|
|
1691
1693
|
console.log(`[auto-webmcp] orphan: using page-wide fallback submit button: "${submitBtn.textContent?.trim()}"`);
|