[Greasemonkey] Greasemonkey, Platypus and Firefox 1.5
Scott Turner
srt19170 at gmail.com
Sun Dec 4 11:25:42 EST 2005
Greetings Monkeys!
I've been somewhat out-of-touch with the Greasmonkey community for some
time, but Platypus doesn't work under Firefox 1.5 and GM 0.6.4, so I've
started to investigate what has changed and needs to be fixed. As always,
I'll appreciate any and all help you can render.
(And while I'm here, why am I the only one to have pimped Mark's
"Greasemonkey Hacks"?
http://www.amazon.com/gp/product/0596101651/qid=1133712539/sr=8-1/ref=pd_bbs_1/103-4151415-2997461?n=507846&s=books&v=glance)
I've identified at least 3 problems with Platypus under 1.5:
(1) The Platypus save function was calling in to Greasemonkey's
ScriptDownloader to save the generated script in one step (skipping the
popup/install). 0.6.4 doesn't seem to expose ScriptDownloader. I can see
how exposing a method for installing a Gm script silently is a bad thing, so
I wouldn't advocate that, but a method that would install a script followed
by an "You have just installed a script" alert might be acceptable.
Thoughts?
(2) The Platypus-generated GM scripts work by calling
"platypus_do_function", which Platypus hung on the global window via:
var win = e.explicitOriginalTarget.defaultView;
//share your chrome func by assigning to a global
// prop in the page context.
win.platypus_do_function = platypus_do_function;
}, false);
this no longer seems to work either for a GM script or in general. Is it
still possible to do this in a way that makes the function available inside
the GM sandbox? If nothing else, I would guess that Playtpus could be
registered as a component and then referenced that way inside of GM...?
Seems like a lot of work, but if necessary I could do that -- particularly
if anyone can point me to a tutorial :-)
(3) Supposing that platypus_do_function is available inside a GM script, it
takes as an argument the window being affected. My guess is that I can pass
in "unsafeWindow" to get the old functionality -- does that sound right?
Per usual, I much appreciate your help!
-- Scott
More information about the Greasemonkey
mailing list