浏览器扩展开发问题:Zoom会议触发React弹窗失败
Zoom浏览器扩展开发问题:ContentScript未触发且无法控制会议打开流程
需求说明
- 开发一款浏览器扩展,目标是用户加入Zoom会议时弹出React对话框/模态框
- 理想交互:用户未操作对话框时,暂停Zoom应用自动打开;点击「是」恢复打开,点击「否」终止打开
- 最低要求:仅成功弹出对话框即可,无需控制Zoom打开流程
当前异常表现
- ContentScript未执行:控制台无
ContentScript running...日志,仅输出Zoom外部协议启动信息:Launched external handler for 'zoommtg://zoom.us/join?action=join&confno=SOME_NUMBER&pwd=SOME_PWD&confid=SOME_CONFID&browser=chrome'. - 修改
run_at为document_start后,触发DOM错误:Uncaught Error: Target container is not a DOM element.
当前配置与代码
manifest.json(部分内容)
{ "manifest_version": 2, "permissions": [ "activeTab", "storage", "https://*zoom.us/*", "https://zoom.us/*" ], "content_scripts": [ { "matches": ["https://*.zoom.us/*", "https://zoom.us/*"], "js": ["js/contentScript.bundle.js"], "run_at": "document_end" } ] }
contentScript.tsx代码
console.log('ContentScript running...'); // HTML injection const app = document.createElement('div'); app.id = 'react-root'; document.querySelector('body')?.prepend(app); ReactDOM.render(<Dialog />, document.getElementById('react-root'));
内容的提问来源于stack exchange,提问作者rickerp
相关产品推荐
相关产品推荐

