[Greasemonkey] extension localization
chris feldmann
cfeldmann at gmail.com
Tue Dec 20 01:10:48 EST 2005
On 12/20/05, Aaron Boodman <zboogs at gmail.com> wrote:
> On 12/19/05, chris feldmann <cfeldmann at gmail.com> wrote:
> > In the process of working on a modeless alert system for install
> > success notification, I added localization sort of as an exercise to
> > familiarize myself with greasemonkey.
>
> Right on.
>
> > As for the notification thingy, I found a neat way to do it, but ran
> > into cross-platform compatibility problems I'm still sorting out. I
> > still don't like clicking on that alert.
>
> I think we (at work) have pretty much figured out how to do this.
> Check out how Google Web Comments accomplishes it's overlay. I think
> that's the way to go.
>
> (basically, you add an <hbox> with position:fixed; bottom:npx,
> right:npx; width:kpx, height:kpx; z-index:100; (or whatever) and add
> it to the main-window ID in the overlay.
>
> This seems to work pretty well. The only hiccup is that you have to
> remove and re-add the element to it's parent on tabswitches to force
> it to repaint.
>
> > So ...anyone interested in a patch?
>
> Yeah totally. It will be really nice to have another person familiar
> with Greasemonkey even working on it a little bit.
>
> I'm actually right in the middle of a small refactor to fix all the
> namespacing issues with functions, at which point I had planned to
> check in on HEAD.
>
> I'll probably just add this in at the same time. Gotta look over it
> first, however...
Oh, for heaven's sake please do. I cringe at the thought of anything I
wrote being blindly applied to working software! In fact, pay
attention to my use/misuse of the object system, especially in
creating the stringbundles in script. There seem to be 2 distinct UI
subsystems, so to speak, so I create 2 different stringbundles in
different files.
RE notification: You had actually mentioned that method earlier - but
what contains the hbox? Doesn't it have to be in a window element?
The way I was doing it was with SVG, which, in X-windows and Windows
at least, appears free-floating, with no surrounding window, even when
defined in a window. So I could get that classic svg tiger scooting
around the desktop. But OS X insisted on drawing a window around it,
and I haven't gotten around it.
The patch, by the way, is off the source in CVS as of last night.
More information about the Greasemonkey
mailing list