Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法兼容其他 Cirlce 阅读模式扩展 #1293

Closed
hewenguang opened this issue Apr 19, 2021 · 8 comments
Closed

无法兼容其他 Cirlce 阅读模式扩展 #1293

hewenguang opened this issue Apr 19, 2021 · 8 comments
Labels
enhancement More bugs.

Comments

@hewenguang
Copy link

设备信息

  • 操作系统: [mac]
  • 浏览器版本: [Chrome77]
  • 沙拉查词版本: [v7.18.1]

描述问题

你好,我开发了一个阅读模式插件:https://chrome.google.com/webstore/detail/circle-reading-mode/dhpfcgilccfkodnhbllpiaabofjbjcbg?hl=zh-CN&authuser=0

用户反馈启用我的插件后无法使用沙拉查词,我自己排查没有找到问题。我的扩展会在 body 元素上面创建一个 div ,然后把用户需要的正文重新整理成更方便阅读的样子。所以猜测是沙拉查词是只检测 body 内部元素,而不是 document.documentElement 元素下的文本

希望可以得到回复,如何修复这个问题,感谢

复现步骤

期待的正常行为

复制文字可以正常启用沙拉查词

截图

额外信息

@crimx
Copy link
Owner

crimx commented Apr 19, 2021

好的!我去排查一下!插件做得真棒btw👍

@hewenguang
Copy link
Author

感谢♥️

@crimx
Copy link
Owner

crimx commented Apr 19, 2021

沙拉是监测到了,只是沙拉查词的页面内面板是放在 body 中,随着 body 隐藏了故看不到。

@crimx crimx added the enhancement More bugs. label Apr 19, 2021
@hewenguang
Copy link
Author

沙拉是监测到了,只是沙拉查词的页面内面板是放在 body 中,随着 body 隐藏了故看不到。

我的插件是为了在原页面生成一个新的页面,并且为了防止样式复写,禁用掉了所有的页面原有样式。也就是说,即使沙拉展示也是没有样式的。难搞😂

我在想想有没有办法处理这个

@crimx
Copy link
Owner

crimx commented Apr 19, 2021

我晚些调研一下能不能把查词面板放其它地方。

@hewenguang
Copy link
Author

👌

@crimx crimx reopened this Apr 19, 2021
@BlackHole1
Copy link
Contributor

是不是可以在沙拉查词里提供一个postMessage API,其他插件调用这个API,沙拉查词会根据传参,把面板放插件里指定的DOM元素上

@crimx
Copy link
Owner

crimx commented Apr 20, 2021

@BlackHole1 666666

@crimx crimx closed this as completed in aaeae1c May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement More bugs.
Projects
None yet
Development

No branches or pull requests

3 participants