refactor(browser-extension): move rules to the database

This commit is contained in:
wanhose 2024-08-11 09:06:59 +02:00
parent 0725fcfdfd
commit 1ddc83d3d2
3 changed files with 363 additions and 372 deletions

View File

@ -575,6 +575,369 @@
"selector": "[title=\"ACCEPT AND CONTINUE\"]"
}
],
"rules": [
{
"id": 1,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||app.usercentrics.eu^"
}
},
{
"id": 2,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||c.evidon.com^"
}
},
{
"id": 3,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdn.cookielaw.org^"
}
},
{
"id": 4,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdn.optable.co^"
}
},
{
"id": 5,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdntranscend.eventbrite.com^"
}
},
{
"id": 6,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||chollometro.com/assets/js/CookiesMessage*.js^"
}
},
{
"id": 7,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cmp.inmobi.com^"
}
},
{
"id": 8,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consent.trustarc.com^"
}
},
{
"id": 9,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consent.cookiebot.com^"
}
},
{
"id": 10,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consentcdn.cookiebot.com^"
}
},
{
"id": 11,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cp.as.com^"
}
},
{
"id": 12,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||eu.fastcmp.com^"
}
},
{
"id": 13,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||lensois.com/wp-admin/admin-ajax.php"
}
},
{
"id": 14,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||optanon.blob.core.windows.net^"
}
},
{
"id": 15,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||redditstatic.com/onetrust.*.js"
}
},
{
"id": 16,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||sdk.privacy-center.org^"
}
},
{
"id": 17,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||static.fastcmp.com^"
}
},
{
"id": 18,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||wcpstatic.microsoft.com^"
}
},
{
"id": 19,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||webtools.europa.eu/js/webtools.cck.js^"
}
}
],
"skips": {
"domains": [
"app.diagrams.net",

View File

@ -59,15 +59,6 @@
"run_at": "document_start"
}
],
"declarative_net_request": {
"rule_resources": [
{
"enabled": true,
"id": "ruleset",
"path": "rules.json"
}
]
},
"host_permissions": ["http://*/*", "https://*/*"],
"permissions": ["contextMenus", "declarativeNetRequest", "scripting", "storage"],
"web_accessible_resources": [

View File

@ -1,363 +0,0 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||app.usercentrics.eu^"
}
},
{
"id": 2,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||c.evidon.com^"
}
},
{
"id": 3,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdn.cookielaw.org^"
}
},
{
"id": 4,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdn.optable.co^"
}
},
{
"id": 5,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cdntranscend.eventbrite.com^"
}
},
{
"id": 6,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||chollometro.com/assets/js/CookiesMessage*.js^"
}
},
{
"id": 7,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cmp.inmobi.com^"
}
},
{
"id": 8,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consent.trustarc.com^"
}
},
{
"id": 9,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consent.cookiebot.com^"
}
},
{
"id": 10,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||consentcdn.cookiebot.com^"
}
},
{
"id": 11,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||cp.as.com^"
}
},
{
"id": 12,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||eu.fastcmp.com^"
}
},
{
"id": 13,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||lensois.com/wp-admin/admin-ajax.php"
}
},
{
"id": 14,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||optanon.blob.core.windows.net^"
}
},
{
"id": 15,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||redditstatic.com/onetrust.*.js"
}
},
{
"id": 16,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||sdk.privacy-center.org^"
}
},
{
"id": 17,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||static.fastcmp.com^"
}
},
{
"id": 18,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||wcpstatic.microsoft.com^"
}
},
{
"id": 19,
"priority": 1,
"action": {
"type": "block"
},
"condition": {
"resourceTypes": [
"font",
"image",
"media",
"object",
"script",
"stylesheet",
"xmlhttprequest"
],
"urlFilter": "||webtools.europa.eu/js/webtools.cck.js^"
}
}
]