Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyvab committed Nov 4, 2022
0 parents commit 29c9347
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_metadata

19 changes: 19 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "DeclarativeNetRequest Issues",
"version": "1.0.0",
"description": "Example Extension highlighting issues in declarativeNetRequest API",
"manifest_version": 3,
"permissions": [
"declarativeNetRequest"
],
"host_permissions": ["*://*.example.com/*"],
"declarative_net_request": {
"rule_resources": [
{
"id": "ruleset_1",
"enabled": true,
"path": "rules.json"
}
]
}
}
49 changes: 49 additions & 0 deletions rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": {
"transform": {
"queryTransform": {
"addOrReplaceParams": [
{
"key": "a",
"value": "1"
},
{
"key": "b",
"value": "2"
}
]
}
}
}
},
"condition": {
"urlFilter": "example.com",
"resourceTypes": ["main_frame"]
}
},
{
"id": 2,
"priority": 2,
"action": {
"type": "redirect",
"redirect": {
"transform": {
"queryTransform": {
"removeParams": [
"b"
]
}
}
}
},
"condition": {
"urlFilter": "example.com",
"resourceTypes": ["main_frame"]
}
}
]

0 comments on commit 29c9347

Please sign in to comment.