views:

213

answers:

2

hi,

i've tried the following code :

(function(open) {

    XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {

        this.addEventListener("readystatechange", function() {
            console.log(this.readyState);
        }, false);

        open.call(this, method, url, async, user, pass);
    };

})(XMLHttpRequest.prototype.open);

But it doesn't work with GM on firefox 3.07.

In JS console i can read the error : XMLHttpRequest.prototype is undefined

What's wrong ?

Thanks a lot

+2  A: 

Hi!

Greasmonkey and Firefox 3.x doesn't currently support the "prototype"-property. Please see the following ticket for more information:

http://greasemonkey.devjavu.com/ticket/164

alexn
A: 

OK ! thanks for your quick answer.

No problems! Please mark my answer as "answered", so that other users finds it.
alexn