Files
chrome-extensions-samples/api-samples/declarativeNetRequest/url-blocker
Benjamin Lörincz dc5d34f0f7 pretty print (#895)
* added json for prettier, npm run prettier in lint-staged
2023-05-01 11:29:59 -04:00
..
2023-05-01 11:29:59 -04:00
2023-05-01 11:29:59 -04:00

chrome.declarativeNetRequest - URL Blocker

This sample demonstrates using the chrome.declarativeNetRequest API to block requests.

Overview

Once this extension is installed, any requests made in the main frame to example.com will be blocked.

Implementation Notes

This sample uses the chrome.declarativeNetRequest.onRuleMatchedDebug event which is only available in unpacked extensions.