I see that Google wants Chrome Extension developers to migrate from chrome.webRequest to chrome.declarativeNetRequest. I see static rules, but the trouble there is that how do we allow a user to toggle individual rules on or off per website? Most…
I want to make a Chrome extension that initially blocks the access to a specific website (e.g. example.com), and then, based on some conditions, it allows the user to access it.
As a starting point, I have used the source code from Github that…
I am trying to migrate my extension from V2 to V3. In V3 the webRequest API has been deprecated and replaced by declarative_net_request API. I want to rewrite the below code block using declarative_net_request API, but I don't have idea on how this…
I am trying to block youtube using chromes declarative Net Request API. While I can redirect from the youtube homepage I can still watch embedded videos in google.com or other websites. Trying to use the declarative Net Request to block youtube…
I am trying to modify User-Agent with declarative net API and I have all the needed permission set and no error is showing but the user agent is still not changing.
> manifest.json
"permissions": [
"declarativeNetRequestWithHostAccess",
…
I am having trouble getting a chrome extension that redirects REST API calls from one host to another. Specifically, trying to redirect POSTs that go to https://api.old.com/endpoint to get redirected to https://api.new.com/newapi.
The…
Declarative net Request modify header rule is not working for safari. Works fine on all other browsers (chrome, edge , FF etc)
Safari Version 16.5.2 (18615.2.9.11.10)
manifest rule: "declarativeNetRequestWithHostAccess"
Error: [Error] Error: Invalid…
I've noticed that even though requests are being redirected from host1 to host2 by chrome.declarativeNetRequest rule, host1 is still queried for DNS.
I know this is not a bug, this level of control was not possible even before Manifest V3, but I…
How to block a request if the referer header is not equal to the domain from which the request is made? This needs to be done for extensions with Manifest version 3, using declarativeNetRequest.
const rules = blacklist.map((url, i) => {
…
I've been trying to program a chrome extension that redirects the user to a specific YouTube video whenever they access YouTube. The problem is that currently, typing in 'youtube.com' results in 'ERR_TOO_MANY_REDIRECTS' instead of the specific…
There is a website called x. Upon opening website x it makes a request for a css file from website y.
I am making a darkmode chrome extension for website x. I want to redirect the request website x is making to getting the css file data from my…
When blocking pages with a pattern like so:
chrome.declarativeNetRequest.updateDynamicRules({
addRules: [
{
"id": 1,
"priority": 1,
"action": {"type": "block"},
"condition": {
"urlFilter": "*://*/*lala.js",
…
By using following declarativeNetRequest request, one extension can block network requests from websites in tabs.
[
{
"id": 1,
"priority": 1,
"action": { "type": "block" },
"condition": {
"urlFilter": "*",
…
I want to develop a chrome extension that allows to append a query parameter to a specific URL (i.e. from www.google.com to www.google.com?q=query).
In Manifest v2 it was possible to accomplish it by using the webRequest API, but in Manifest v3 the…
I'm trying to append the matched domain from a declarativeNetRequest rule to the redirect extension page, but I can't seem to be able to get it to work. The redirect is working to my extension page but the matched URL isn't appended.
Here is my code…