firefox插件,透明浮动面板
我正在开发一个 Firefox 插件,希望有一个固定位置(相对于浏览器)半透明面板,并在每个浏览器内容区域的角落显示 3 个图标。这些按钮必须能够与未显示的站点进行通信。
我知道可以将固定位置的 div 注入到 html 中,但我希望按钮在按下时与外部站点进行通信,并在加载时查询信息,所以我认为这会违反同源策略。这也不适用于图像或其他直接媒体网址。
创建浮动图标面板的最简单方法是什么?
I'm developing a firefox addon and would like to have a fixed position (relative to the browser) semitransparent panel with 3 icons shown at the corner of every browser content area. These buttons will have to be able to communicate with a site that is not the site shown.
I know it would be possible to inject a fixed position div to html but I want the buttons to communicate with external site when pressed and also query information when they are loaded so I think that would violate same origin policy. This wouldn't work with image or other direct media urls either.
What would be the easiest way to create the floating icon panel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过大约一周的工作,我找到了它。这是答案,我希望这对其他人有帮助:
http://marcada.ms/2010/02/getting-content-on-top-of-the-browser-space-using-xul/
上面添加了面板,透明度为不是由于以下错误,我可以工作(至少在我使用的Linux中不行)。唉...2007 年开业,2012 年没有关闭。
https://bugzilla.mozilla。 org/show_bug.cgi?id=408284
edit2:我结束了使用扩展文件夹中的文件将 html 数据插入文档正文。效果很好,包括透明度。
edit3:如果有人对我的插件中的工作原理感兴趣,请查看我的实时网站 http://www.upmarker.com
After about of week of work I found it. Here is the answer, I hope this helps someone else:
http://marcada.ms/2010/02/getting-content-on-top-of-the-browser-space-using-xul/
The above adds the panel, transparency is not working (at least not in linux what I work with) because of the following bug. Sigh... opened in 2007 and not closed in 2012.
https://bugzilla.mozilla.org/show_bug.cgi?id=408284
edit2: I ended inserting html data to the body of the document using files from extension folder. Works very well including transparency.
edit3: If anyone is interested how this works in my plugin, check my live site at http://www.upmarker.com