Well, maybe I'm just dense. I've read endless webpages
about extensions, and they all show these .xul files that
create UI elements that overlay the browser UI elements
and SOMETIMES also mention an overlayname.js file to
execute javascript. However, whenever I try this syntax
or that syntax (every alternative that I can think of) that
names the overlayname.js file but NOT any corresponding
UI element... either the browser pukes (spews a bunch of
errors to the error console), or nothing happens at all.
Unfortunately, a bootstrapped extension is insufficient
for my purposes according to every article I've read.
That did seem to be promising, but my extension
must create and interact with additional windows
that hide/show under javascript programmatic control
without getting permission from the user every time.
And there were other limitations of bootstrapped that
also made them unacceptable, unfortunately.
I'm not quite sure what this "watch for windows being
opened" technique is, unless it is something extremely
complex and limited that was talked about in one of
the articles about bootstrapped extensions.
Here is the bottom line. My extension needs to work
on EVERY window that displays HTML. This includes
every window my extension creates to perform the
services it provides. In other words, when my extension
calls window.open() to create new windows to display
information for the user, the services of my extension
need to work on those windows too.
I ***know*** the <script> element isn't a useless UI element!
But so far I have not been able to make extension process
accept my "script" (javascript) unless the javascript file is
registered as part of some other visible XUL UI element like
a new menu-item or something. I mean, have YOU tried to
create a regular extension that has an overlay that ONLY
names a javascript file without any other XUL or UI element
of any kind involved? If so, then I'm simply too stupid to
guess the correct syntax for that from all the simple
extension examples I've been working with. It is quite
possible I'm just being stupid and not seeing the implicit
"sense" of the overlay syntax. I'm not seeing the sense,
which makes it appear to me that an overlay cannot exist
that is simply a javascript filename without any other
XUL UI element at all.
Here is one additional worry I have, that supposedly is
not a problem (according to one javascript book I have).
My extension needs to create two kinds of windows.
One is essentially just a normal firefox browser window,
either identical to firefox, or absent some UI elements.
But the other window must be completely borderless,
like tooltip windows. But mine needs to be able to
display HTML, including a few tiny icon-buttons on
the left followed by a variable length line of text.
And I need those windows to hide and display under
control of my extension without asking the user for
approval or anything. So far my attempts to create
completely borderless windows from javascript within
a window have failed (there's always the damn titlebar,
close button and resize-grips, even when I say not to
include these in the options in my window.open() call.
Supposedly javascript running in the chrome has
more complete "permissions", so maybe these
problems will vanish when I finally get a regular
extension working. I hope so, or I am ***screwed***.
====================================
On Mar 25, 2:10 am, Jonathan Protzenko <
jonathan.protze...@gmail.com>
wrote:
> I don't know how I can provide a clearer answer:
> - either you do a restartless addon, and you use a technique
> such as
https://github.com/protz/GMail-Conversation-View/blob/master/bootstra...
> to watch for new windows being opened and add your code into each one
> of them,
> - or you use the overlay mechanism to specify *which* window your
> <script> element should be added to.
>
> A <script> element isn't a useless UI element, it is the regular way to
> make your code run in a given window.
>
> Cheers,
>
> jonathan
>
> On Sun 25 Mar 2012 08:43:35 AM CEST, bootstrap wrote:
>
>
>
> > On Mar 24, 3:20 am, Jonathan Protzenko<
jonathan.protze...@gmail.com>
> > wrote:
> >>
https://developer.mozilla.org/en/Building_an_Extensionwillhelp you
> >>>
https://lists.mozilla.org/listinfo/dev-extensions-Hide quoted text -