Hi guys,
I doing a simple test redirect using declarativeNetRequest.
This is the rule:
var redirectFile = chrome.runtime.getURL("./helper.html");
chrome.declarativeNetRequest.updateDynamicRules(
{
addRules:
[
{
"id": 10,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": redirectFile + "?url=\\0"
}
},
"condition": {
"regexFilter": "^
https://www.test.de/",
"resourceTypes": [
"main_frame"
]
}
}
],
removeRuleIds: [10]
}
);
So I navigate to
google.de and search for
test.de. When I click und the page the redirect is executed to
But the page is blocked:
I created a new chrome user and made sure that the is no other extension active.
If I reload the page it is shown. But if its redirected via a click on a page it doesnt work. If I type in "
www.test.de" in the url field it also works.
Do you have any idea what this is caused by? Or is it an error from chrome?
BR Alex