3 ms·
Here's a Manifest V3 extension to block Google Analytics. First, the manifest.json file: { "name": "Block Google Analytics", "version": "1.0", "descrip
by lapcat 3y ago
Here's a Manifest V3 extension to block Google Analytics. First, the manifest.json file:
{
"name": "Block Google Analytics",
"version": "1.0",
"description": "Blocks Google Analytics.",
"declarative_net_request": {
"rule_resources": [{
"id": "ruleset_1",
"enabled": true,
"path": "rules.json"
}]
},
"permissions": [
"declarativeNetRequest"
],
"manifest_version": 3
}
And the rules.json file:
[
{
"id": 1,
"action": { "type": "block" },
"condition": {
"domainType": "thirdParty",
"requestDomains": [
"analytics.google.com",
"google-analytics.com"
],
"resourceTypes": [
"ping",
"script",
"xmlhttprequest"
]
}
}
]