Display popup window from context menu?

1,660 views
Skip to first unread message

Robert Dailey

unread,
Nov 7, 2010, 11:25:20 AM11/7/10
to Chromium-extensions
Hi,

I have a context menu extension that, when clicked, should open a
popup window that allows me to present various options to the user.
This is sort of like an options page, but I don't know if I want it to
take up a whole tab.

Any ideas on how to accomplish this?

PhistucK

unread,
Nov 8, 2010, 1:45:03 AM11/8/10
to Robert Dailey, Chromium-extensions
You can inject a script (using chrome.tabs.executeScript) that will create a floating <div> or something.

PhistucK




--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Robert Dailey

unread,
Nov 8, 2010, 2:40:15 PM11/8/10
to Chromium-extensions
I did a lot of research on "popovers" (these seem to be floating divs)
but I'm not sure how you set up the HTML & CSS for one. Any tips here?

Thanks for your help so far!

On Nov 8, 12:45 am, PhistucK <phist...@gmail.com> wrote:
> You can inject a script (using
> chrome.tabs.executeScript<http://code.google.com/chrome/extensions/tabs.html#method-executeScript>)
> that will create a floating <div> or something.
>
> ☆*PhistucK*
>
>
>
>
>
>
>
> On Sun, Nov 7, 2010 at 18:25, Robert Dailey <rcdai...@gmail.com> wrote:
> > Hi,
>
> > I have a context menu extension that, when clicked, should open a
> > popup window that allows me to present various options to the user.
> > This is sort of like an options page, but I don't know if I want it to
> > take up a whole tab.
>
> > Any ideas on how to accomplish this?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to chromium-extensi...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-extensions+unsubscr...@chromium.org<chromium-extensions%2Bunsubscr...@chromium.org>
> > .

PhistucK

unread,
Nov 8, 2010, 3:14:18 PM11/8/10
to Robert Dailey, Chromium-extensions
Mmm... something like -
var div = document.createElement("DIV");
div.style.position = "fixed";
div.style.top = "5px";
div.style.left = "5px";
div.style.width = "400px";
div.style.height = "400px";
div.style.backgroundColor = "black";
div.style.color = "white";
div.innerHTML = "Some <b>html</b>.";
document.body.appendChild(div);

PhistucK



To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
Reply all
Reply to author
Forward
0 new messages