← 教程列表
实战📊 中级🛠 AI赚钱

`helper.js` (client-side script)

📅 2026/6/14 15:43:48⏱ 约 5 分钟阅读👁 8 阅读

**Remove:** - `sendToClaude()` function and the "Sent to Claude" page takeover - `window.send()` function (was tied to the removed Send button) - Form submission handler — no purpose without the feedback textarea, adds log noise - Input change handler — same reason - `pageshow` event listener (was added to fix textarea persistence — no textarea anymore) **Keep:** - WebSocket connection, reconnect logic, event queue - Reload handler (`window.location.reload()` on server push) - `window.toggleSelect()` for selection highlighting - `window.selectedChoice` tracking - `window.brainstorm.send()` and `window.brainstorm.choice()` — these are distinct from the removed `window.send()`. They call `sendEvent` which logs to the server via WebSocket. Useful for custom full-document pages. **Narrow:** - Click handler: capture only `[data-choice]` clicks, not all buttons/links. The broad capture was needed when the browser was a feedback channel; now it's just for selection tracking. **Add:** - On `data-choice` click, update the selection indicator bar text to show which option was selected. **Remove from `window.brainstorm` API:** - `brainstorm.sendToClaude` — no longer exists

← 返回教程列表 AI8899 · 内容仅供学习参考