Skip to content

Commit

Permalink
Add dnr-domaintype-thirdparty-wecg-731
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjeurissen committed Dec 5, 2024
1 parent 1a94b7b commit 017924d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions issues/dnr-domaintype-thirdparty-wecg-731/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
WECG issue:
https://github.com/w3c/webextensions/issues/731
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Listen for the extension being installed or updated
chrome.runtime.onInstalled.addListener(() => {
chrome.declarativeNetRequest.updateDynamicRules({
addRules: [{
id: 1,
action: {
type: 'block',
},
condition: {
domainType: 'thirdParty',
urlFilter: 'iana.org',
resourceTypes: ['main_frame', 'sub_frame'],
},
}],
}).then(() => {
console.log("Rules added");
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"manifest_version": 3,
"name": "DNR thirdParty domainType",
"version": "1.0",
"description": "Demo extension showcasing issues regarding thirdParty domainType in DNR.",
"permissions": [ "declarativeNetRequest" ],
"background": {
"scripts": ["background.js"],
"service_worker": "background.js"
},
"host_permissions": [
"<all_urls>"
]
}

1 comment on commit 017924d

@carlosjeurissen
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.