How to replace javascript file request with content from another file in FF addon?

I am looking for some recommendations on how to replace requests for a specific javascript file with another file that I will pack with the Firefox addon.

+3
source share
1 answer

See How can I implement a content converter in Firefox for all page elements? (its scope is much wider than what you really need - read on) on how to use the HTTP protocol handlerregisterFactory to register a surrogate , which can then create channels with alternative (e.g., -types) URIs when called with your custom script URI.file:///...newChannel

+4
source

Source: https://habr.com/ru/post/1751856/


All Articles