(tabId, strategy)
| 6088 | } |
| 6089 | |
| 6090 | async function triggerStep8ContentStrategy(tabId, strategy) { |
| 6091 | await ensureStep8SignupPageReady(tabId, { |
| 6092 | timeoutMs: 15000, |
| 6093 | logMessage: '步骤 8:认证页内容脚本已失联,正在恢复后继续点击“继续”按钮...', |
| 6094 | }); |
| 6095 | const result = await sendToContentScriptResilient('signup-page', { |
| 6096 | type: 'STEP8_TRIGGER_CONTINUE', |
| 6097 | source: 'background', |
| 6098 | payload: { |
| 6099 | strategy, |
| 6100 | findTimeoutMs: 4000, |
| 6101 | enabledTimeoutMs: 3000, |
| 6102 | }, |
| 6103 | }, { |
| 6104 | timeoutMs: 15000, |
| 6105 | retryDelayMs: 600, |
| 6106 | logMessage: '步骤 8:认证页正在切换,等待“继续”按钮重新就绪...', |
| 6107 | }); |
| 6108 | |
| 6109 | if (result?.error) { |
| 6110 | throw new Error(result.error); |
| 6111 | } |
| 6112 | |
| 6113 | return result; |
| 6114 | } |
| 6115 | |
| 6116 | async function reloadStep8ConsentPage(tabId, timeoutMs = 30000) { |
| 6117 | if (!Number.isInteger(tabId)) { |
no test coverage detected