I'm writing a Firefox extension to make a dynamic web app more accessible (applying ARIA roles, alt text for images, etc.) and I was wondering: is it possible to change the contents of existing JavaScript from the extension? I was previously using the GreaseMonkey add-on to do something like this:
SomeObjectTheyCreated.Method = function(text){
// My code here.
};
But the "GreaseMonkey compiler" is out of date and causes more trouble then it's worth, so I've got a ton of homework to do just learning to use this old-fashioned SDK (a command prompt, really? lol). :)
All joking aside though, when I try to do something like the code above, the command prompt gives me the error "SomeObjectTheyCreated is undefined". This makes sense, of course, because I didn't define it in the extension. So what I'm wondering is, is there another way to sort of "re-define" scripts on the page? Thanks. :)
Aucun commentaire:
Enregistrer un commentaire