开发者

How to preprocess HTML before it's loaded and parsed by Mozilla?

开发者 https://www.devze.com 2023-01-17 13:44 出处:网络
I need a way to process HTML before it\'s actually loaded 开发者_StackOverflowand parsed by Mozilla. Is there any content listener that I can use in my Firefox extension?Add an Event Listener to the g

I need a way to process HTML before it's actually loaded 开发者_StackOverflowand parsed by Mozilla. Is there any content listener that I can use in my Firefox extension?


Add an Event Listener to the gBrowser global object, making sure to set usecapture to true. You could also intercept the response.


Do you mean something like greasemonkey? Sorry, I don't know enough about Firefox extensions. The Greasemonkey website is blocked here in China and my VPN does not work at the moment, but maybe they are open source. Then you can see what they do, if writing a greasemonkey skript is not what you want.

0

精彩评论

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