mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
chrome.declarativeNetRequest - URL Redirect
This sample demonstrates using the chrome.declarativeNetRequest API to redirect requests.
Overview
Once this extension is installed, any requests made in the main frame to the following URLs will be redirected:
- https://developer.chrome.com/docs/extensions/mv2/
- https://developer.chrome.com/docs/extensions/reference/browserAction/
- https://developer.chrome.com/docs/extensions/reference/declarativeWebRequest/
- https://developer.chrome.com/docs/extensions/reference/pageAction/
- https://developer.chrome.com/docs/extensions/reference/webRequest/
Implementation Notes
This sample uses the chrome.declarativeNetRequest.onRuleMatchedDebug event which is only available in unpacked extensions.