I am developing a firefox addon(using Add-on Builder), which compares the requested webpage content with suspicious webpage content and block the webpage(if it matches).
But i am not getting the blocking a requested webpage (expecting, before full loading) in browser through my addon code.
some solutions, like GoogleSafeBrowsing (not an addon), blocking the webpage and displaying the malware domain names and etc. how it is possible to display the suspicious content before loading webpage and blocking the webpage from loading.
i need a mechanism (with addon or without addon). any help…….
Thanks,
update:
i need this mechanism programitically in javascript (like, if(match){window.close()}…..like that)
You should look at using a lower level Firefox api called nsiContentPolicy – it is possible to use this with the SDK as detailed in this blog post:
http://lduros.net/posts/blocking-images-and-other-content-mozila-add-sdk-and-nsicontentpolicy/