()
| 575 | } |
| 576 | |
| 577 | function findCodexOAuthHeader() { |
| 578 | const candidates = document.querySelectorAll('.card-header, [class*="cardHeader"], .card, [class*="card"]'); |
| 579 | return Array.from(candidates).find((el) => { |
| 580 | if (!isVisibleElement(el)) return false; |
| 581 | const text = (el.textContent || '').toLowerCase(); |
| 582 | return text.includes('codex') && text.includes('oauth'); |
| 583 | }) || null; |
| 584 | } |
| 585 | |
| 586 | function findOAuthCardLoginButton(header) { |
| 587 | const card = header?.closest('.card, [class*="card"]') || header?.parentElement || document; |
no test coverage detected