MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / getActivationStrategy

Function getActivationStrategy

content/activation-utils.js:21–38  ·  view source on GitHub ↗
(target = {})

Source from the content-addressed store, hash-verified

19 }
20
21 function getActivationStrategy(target = {}) {
22 const tagName = normalizeTagName(target.tagName);
23 const type = normalizeType(target.type);
24 const pathname = normalizePathname(target.pathname);
25 const hasForm = Boolean(target.hasForm);
26 const isEmailVerificationRoute = /\/email-verification(?:[/?#]|$)/i.test(pathname);
27 const isSubmitButton = hasForm
28 && (
29 (tagName === 'button' && (!type || type === 'submit'))
30 || (tagName === 'input' && type === 'submit')
31 );
32
33 if (isSubmitButton && isEmailVerificationRoute) {
34 return { method: 'requestSubmit' };
35 }
36
37 return { method: 'click' };
38 }
39
40 function isRecoverableStep9AuthFailure(statusText) {
41 const text = String(statusText || '').replace(/\s+/g, ' ').trim();

Callers 2

simulateClickFunction · 0.85

Calls 3

normalizeTagNameFunction · 0.85
normalizeTypeFunction · 0.85
normalizePathnameFunction · 0.85

Tested by

no test coverage detected