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.
精彩评论