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.esm.js
CHANGED
|
@@ -1536,6 +1536,7 @@ async function scanOrphanInputs(config) {
|
|
|
1536
1536
|
if (!isWebMCPSupported())
|
|
1537
1537
|
return;
|
|
1538
1538
|
const SUBMIT_BTN_SELECTOR = '[type="submit"]:not([disabled]), button:not([type]):not([disabled])';
|
|
1539
|
+
const SUBMIT_BTN_GROUPING_SELECTOR = '[type="submit"], button:not([type])';
|
|
1539
1540
|
const SUBMIT_TEXT_RE = /subscribe|submit|sign[\s-]?up|send|join|go|search/i;
|
|
1540
1541
|
const orphanInputs = Array.from(
|
|
1541
1542
|
document.querySelectorAll(
|
|
@@ -1555,7 +1556,7 @@ async function scanOrphanInputs(config) {
|
|
|
1555
1556
|
let container = input.parentElement;
|
|
1556
1557
|
let foundContainer = input.parentElement ?? document.body;
|
|
1557
1558
|
while (container && container !== document.body) {
|
|
1558
|
-
const hasSubmitBtn = container.querySelector(
|
|
1559
|
+
const hasSubmitBtn = container.querySelector(SUBMIT_BTN_GROUPING_SELECTOR) !== null || Array.from(container.querySelectorAll("button")).some(
|
|
1559
1560
|
(b) => SUBMIT_TEXT_RE.test(b.textContent ?? "")
|
|
1560
1561
|
);
|
|
1561
1562
|
if (hasSubmitBtn) {
|