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.
@@ -1690,21 +1690,23 @@ async function scanOrphanInputs(config) {
1690
1690
  console.log(`[auto-webmcp] orphan: using disabled submit button as reference: "${submitBtn.textContent?.trim()}"`);
1691
1691
  }
1692
1692
  if (!submitBtn) {
1693
- const containerBtns = Array.from(container.querySelectorAll("button")).filter((b) => {
1693
+ const containerBtns = Array.from(
1694
+ container.querySelectorAll('button, [role="button"]')
1695
+ ).filter((b) => {
1694
1696
  const r = b.getBoundingClientRect();
1695
- return r.width > 0 && r.height > 0 && !b.disabled && SUBMIT_TEXT_RE.test(b.textContent ?? "");
1697
+ return r.width > 0 && r.height > 0 && !b.disabled && b.getAttribute("aria-disabled") !== "true" && SUBMIT_TEXT_RE.test(b.textContent ?? "");
1696
1698
  });
1697
1699
  submitBtn = containerBtns[containerBtns.length - 1] ?? null;
1698
1700
  if (submitBtn)
1699
1701
  console.log(`[auto-webmcp] orphan: using text-matched button in container: "${submitBtn.textContent?.trim()}"`);
1700
1702
  }
1701
1703
  if (!submitBtn) {
1702
- const pageBtns = Array.from(document.querySelectorAll("button")).filter(
1703
- (b) => {
1704
- const r = b.getBoundingClientRect();
1705
- return r.width > 0 && r.height > 0 && SUBMIT_TEXT_RE.test(b.textContent ?? "");
1706
- }
1707
- );
1704
+ const pageBtns = Array.from(
1705
+ document.querySelectorAll('button, [role="button"]')
1706
+ ).filter((b) => {
1707
+ const r = b.getBoundingClientRect();
1708
+ return r.width > 0 && r.height > 0 && b.getAttribute("aria-disabled") !== "true" && SUBMIT_TEXT_RE.test(b.textContent ?? "");
1709
+ });
1708
1710
  submitBtn = pageBtns[pageBtns.length - 1] ?? null;
1709
1711
  if (submitBtn)
1710
1712
  console.log(`[auto-webmcp] orphan: using page-wide fallback submit button: "${submitBtn.textContent?.trim()}"`);