Is it possible to update the HTML content of a page using a Firefox extension or desktop application?

100 views Asked by At

Is there any method to update the main HTML content of any site while loading on Firefox? Can Firefox extensions (.xpi) do that?

Alternately, is there any method by which desktop software can inject or remove HTML code from sites which users open while the page is loading?

1

There are 1 answers

1
Makyen On BEST ANSWER

Yes, modifying the HTMl code of one, or many, sites can be done by a Firefox extension. However, this question is too broad to answer appropriately here.

You should probably look at the Add-on SDK tutorials. For instance, the Modify web pages based on URL tutorial should be appropriate.

Alternately, you could use the Greasemonkey Extension. For Greasemonkey, you can see the Greasemonkey Manual for more information.

Which of those you choose would depend significantly on what you are attempting to accomplish and the audience for which you are attempting to make this work, among other factors.

It would be difficult to write a separate desktop application to modify the HTML code of a site within the Firefox browser (and only within Firefox). While this might be possible, it would probably be significantly more effort than doing so with a Firefox add-on or using Greasemonkey.