(message, level = 'info')
| 3474 | // ============================================================ |
| 3475 | |
| 3476 | async function addLog(message, level = 'info') { |
| 3477 | if (typeof loggingStatus !== 'undefined' && loggingStatus?.addLog) { |
| 3478 | return loggingStatus.addLog(message, level); |
| 3479 | } |
| 3480 | const state = await getState(); |
| 3481 | const logs = state.logs || []; |
| 3482 | const entry = { message, level, timestamp: Date.now() }; |
| 3483 | logs.push(entry); |
| 3484 | if (logs.length > 500) logs.splice(0, logs.length - 500); |
| 3485 | await setState({ logs }); |
| 3486 | chrome.runtime.sendMessage({ type: 'LOG_ENTRY', payload: entry }).catch(() => { }); |
| 3487 | } |
| 3488 | |
| 3489 | function getStep8CallbackUrlFromNavigation(details, signupTabId) { |
| 3490 | if (typeof navigationUtils !== 'undefined' && navigationUtils?.getStep8CallbackUrlFromNavigation) { |
no test coverage detected