[Greasemonkey] unsafeWindow.XmlHttpRequest in Greasemonkey 0.6.4
Aaron Boodman
zboogs at gmail.com
Thu Jan 12 15:01:22 EST 2006
On 1/12/06, Julien Couvreur <julien.couvreur at gmail.com> wrote:
> But alert(unsafeWindow.XMLHttpRequest) is null. Is that expected? If so, why?
I can't explain this, it should work.
> Basically, I have two scripts: tracing [1] and debugging. The tracing
> one needs to modify the prototype of the XMLHttpRequest used by the
> page and the debugging one (which is more popular) needs to replace
> the XMLHttpRequest constructor in the page context also.
I have checked out the scripts. Have you considered writing to a popup
window or some such? If you didn't need GM_log, then you could add the
entire script to the page's context using something like:
window.location.href = "javascript:" + bigChunkOfJS;
I think that this would be a lot better than using unsafeWindow the
way you are there.
- a
More information about the Greasemonkey
mailing list