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

Function findOneTimeCodeLoginTrigger

content/signup-page.js:148–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146}
147
148function findOneTimeCodeLoginTrigger() {
149 const candidates = document.querySelectorAll(
150 'button, a, [role="button"], [role="link"], input[type="button"], input[type="submit"]'
151 );
152
153 for (const el of candidates) {
154 if (!isVisibleElement(el)) continue;
155 if (el.disabled || el.getAttribute('aria-disabled') === 'true') continue;
156
157 const text = [
158 el.textContent,
159 el.value,
160 el.getAttribute('aria-label'),
161 el.getAttribute('title'),
162 ]
163 .filter(Boolean)
164 .join(' ')
165 .replace(/\s+/g, ' ')
166 .trim();
167
168 if (text && ONE_TIME_CODE_LOGIN_PATTERN.test(text)) {
169 return el;
170 }
171 }
172
173 return null;
174}
175
176function findResendVerificationCodeTrigger({ allowDisabled = false } = {}) {
177 const candidates = document.querySelectorAll(

Callers 2

inspectLoginAuthStateFunction · 0.85

Calls 1

isVisibleElementFunction · 0.70

Tested by

no test coverage detected