[Greasemonkey] GM 0.6.2 no workie
Aaron Boodman
zboogs at gmail.com
Wed Nov 30 23:51:23 EST 2005
BTW, I've already shipped the code, but I'll still response below...
On 11/30/05, Lenny Domnitser <ldrhcp at gmail.com> wrote:
> On 11/29/05, Aaron Boodman <zboogs at gmail.com> wrote:
> > So my options right now are:
> >
> > * Find some way I didn't think of to make this work. I'm meeting with
> > the Mozilla people today to ask them about this.
>
> +1
No solutions came out of this. :-(
> > * Emulate XMLHttpRequest with GM_xmlhttpRequest. This will fix scripts
> > who rely on basic XMLHttpRequest functionality, but will fail for
> > scripts which use anything advanced which cannot be emulated (like
> > getResponseHeader() or server push). It will also not fix any of the
> > other less-commonly used xmlextras objects, which people might
> > sometimes reach for and be surprised to not find.
>
> I had to do this in a script of mine, though I didn't know the reason
> before now. Using regular XMLHttpRequest was a little quicker since it
> was acting on readystate=2, but I think this is a reasonable sacrifice
> to make temporarily if it means getting an official version out that
> works with Fx 1.5.
You can use onreadystatechange with GM_xmlhttpRequest:
GM_xmlhttpRequest({
method: "GET",
url: "http://youngpup.net",
onreadystatechange: function(details) {
alert(details.readyState);
}});
> > * Ship without xml-extras support. Authors could still make requests
> > using GM_xmlhttpRequest and xpath searches using document.evaluate().
> > They wouldn't be able to construct new XMLDocuments or use lower-level
> > xpath interfaces, but I don't know of anyone doing that in
> > Greasemonkey right now.
>
> Not ideal, but I think it's worth it so users going from Fx 1.0 to 1.5
> have something. I'm not sure of what all of the limitations are, but
> you are probably right that most of this stuff isn't being used.
This is what I ended up doing and is in 0.6.4.
> My vote: ship the CVS code. It's better to make most scripts work than
> have no official release for end users upgrading to Fx 1.5. Perhaps a
> warning that some scripts won't work would be good, but I don't think
> anything beyond that is needed.
There were some bugs that cropped up which I fixed, but that's
basically what I did.
- a
More information about the Greasemonkey
mailing list