i want to create an addon for firefox, that should check every JavaScript on a loading page. And if there is a Code, which is not allowed it should be blocked or modiefied (it is a part of XSS Protection). But i don't know, how to implement this. I tried to create an http-on-modify-request observer and so i have an access to the scripts. But how can i modify them before Firefox execute it?
My second trial was to create an addon like the Flashblock addon. So i made a CSS-file and bind the script tags to a xml-file. In the xml file i create a placeholder and replace the javascript. When i start a page and look into DOM-Inspector it works fine... there are div-tags instead of javascript tags. The Problem is, that Firefox still executed the original javascripts and so my trial failed.
Have anybody some tips for me?
ps: sry, for my english, but english is not my native language
I think you're looking for nsITraceableChannel: http://www.softwareishard.com/blog/firebug/nsitraceablechannel-intercept-http-traffic/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With