auto-webmcp 0.3.5 → 0.3.6
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 +2 -1
- package/dist/auto-webmcp.cjs.js.map +2 -2
- package/dist/auto-webmcp.esm.js +2 -1
- package/dist/auto-webmcp.esm.js.map +2 -2
- package/dist/auto-webmcp.iife.js +1 -1
- package/dist/auto-webmcp.iife.js.map +3 -3
- package/dist/discovery.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/auto-webmcp.cjs.js
CHANGED
|
@@ -1555,6 +1555,7 @@ async function scanOrphanInputs(config) {
|
|
|
1555
1555
|
if (!isWebMCPSupported())
|
|
1556
1556
|
return;
|
|
1557
1557
|
const SUBMIT_BTN_SELECTOR = '[type="submit"]:not([disabled]), button:not([type]):not([disabled])';
|
|
1558
|
+
const SUBMIT_BTN_GROUPING_SELECTOR = '[type="submit"], button:not([type])';
|
|
1558
1559
|
const SUBMIT_TEXT_RE = /subscribe|submit|sign[\s-]?up|send|join|go|search/i;
|
|
1559
1560
|
const orphanInputs = Array.from(
|
|
1560
1561
|
document.querySelectorAll(
|
|
@@ -1574,7 +1575,7 @@ async function scanOrphanInputs(config) {
|
|
|
1574
1575
|
let container = input.parentElement;
|
|
1575
1576
|
let foundContainer = input.parentElement ?? document.body;
|
|
1576
1577
|
while (container && container !== document.body) {
|
|
1577
|
-
const hasSubmitBtn = container.querySelector(
|
|
1578
|
+
const hasSubmitBtn = container.querySelector(SUBMIT_BTN_GROUPING_SELECTOR) !== null || Array.from(container.querySelectorAll("button")).some(
|
|
1578
1579
|
(b) => SUBMIT_TEXT_RE.test(b.textContent ?? "")
|
|
1579
1580
|
);
|
|
1580
1581
|
if (hasSubmitBtn) {
|