开发者

Google Chrome extension modifying page request

开发者 https://www.devze.com 2023-01-19 06:39 出处:网络
Is it possible to catch the request of a page before it is sent out? I would like to check and modify the data sent out. For example if I have a text box on a page and the form was submittedI would li

Is it possible to catch the request of a page before it is sent out? I would like to check and modify the data sent out. For example if I have a text box on a page and the form was submitted I would like to get to the data of the text box using the extension modify it and the开发者_Go百科n send it on it's way.

If any one can point me in the right direction that would be grate


Chrome has chrome.experimental.webRequest API module which allows to catch web requests before they are sent, but from the docs it doesn't look like you can modify them, just observe.

I think you would be better off injecting a content script to pages and listening to onbeforesubmit event on forms.

0

精彩评论

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