开发者

Creating a panel in Google Chrome

I'm moving a plugin from Firefox to Chrome. In Firefox its possible to create a separate panel attached to the current window instead of the popup you get in chrome.

I know Chrome allows you to insert scripts into a page. How would I add a pa开发者_StackOverflow社区nel to the bottom of the window using script insertion in a way that doesn't alter the layout?

Thanks.


Chrome API doesn't provide any help with this. You would need to insert and position the panel div manually through content script.

How to do style it:

  • Set position:fixed;bottom:0; for the panel
  • Set margin-bottom of the page body equal to panel height
  • Look for absolutely positioned elements on the page that have bottom value set and decrease it by panel height.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜