开发者

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

开发者 https://www.devze.com 2023-01-04 16:03 出处:网络
I\'m looking for some guidance on how to replace requests for a specific javascript file with anot开发者_开发百科her file that I\'ll package with the Firefox addon.See How can I implement a content co

I'm looking for some guidance on how to replace requests for a specific javascript file with anot开发者_开发百科her file that I'll package with the Firefox addon.


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 registerFactory to register a surrogate HTTP protocol handler, which can then instantiate channels with alternate (e.g. file:///...-type) URIs when newChannel is called with your particualr script's URI.

0

精彩评论

暂无评论...
验证码 换一张
取 消