This browser extension allows you to define rules for modifying, blocking, and redirecting web requests using a simple syntax that is close to natural language. The extension leverages chrome's declarativeNetRequest
API for modifying network requests.
https://chrome.google.com/webstore/detail/request-control/gkadogdmakibilhnklflcgaennojgipd
SET | <URL_COMPONENT> |
VALUE <STRING> |
FOR | URL <REGEX> |
REMOVE | <URL_COMPONENT> |
FROM | URL <REGEX> |
- |
REDIRECT | URL <REGEX> |
TO | URL <REGEX> |
- |
BLOCK | URL <REGEX> |
- | - | - |
ALLOW | URL <REGEX> |
- | - | - |
<URL_COMPONENT>
can be FRAGMENT
, HOST
, PASSWORD
, PATH
, PORT
, QUERY
, SCHEME
, or USERNAME
.
SET | QUERY | ?useskin=vector |
FOR | https://en.wikipedia.org/wiki |
REMOVE | FRAGMENT | FROM | https://en.wikipedia.org/wiki/URL#Syntax |
- |
REDIRECT | https://(.*?).m.wikipedia.org |
TO | https://$1.wikipedia.org |
- |
BLOCK | https://www.reddit.com |
- | - | - |
ALLOW | https://www.reddit.com/r/popular |
- | - | - |
Some websites install service workers that intercept network requests before they can be processed by the browser. You can unregister service workers either via DevTools (Application > Service Workers) or by pasting the following code into the address bar of an affected website (you'll have to retype the javascript:
part after pasting):
javascript:navigator.serviceWorker.getRegistrations().then(rs => { for (const r of rs) r.unregister() });
The extension automatically unregisters service workers when rules for popular websites are applied (see config.js
for the full list of websites).
Chrome uses google's re2 for evaluating regular expressions. Expressions containing lookarounds are not supported.
To grab the latest version of monaco-editor
, run the following command:
curl -Lso monaco.js https://esm.run/monaco-editor
- Automatically unregister service workers (browsingData)
- Allow setting request headers (ModifyHeaderInfo)
- Allow setting query parameters (QueryTransform)
- Add support for dark mode
- Firefox support