Added new rules + regex fixes

#303
This commit is contained in:
Kevin Röbert 2019-11-27 23:16:08 +01:00
parent 7c5f4c31d5
commit 51fe1bcac3
2 changed files with 42 additions and 35 deletions

View File

@ -433,7 +433,7 @@ function start() {
* @param {boolean} isActive Is this rule active? * @param {boolean} isActive Is this rule active?
*/ */
this.addRule = function (rule, isActive = true) { this.addRule = function (rule, isActive = true) {
rule = "([\\/|\\?|#]|(&|&))+(" + rule + "=[^\\/|\\?|&]*)"; rule = "([\\/\\?#]|(&|&))+(" + rule + "=[^\\/\\?&]*)";
this.applyRule(enabled_rules, disabled_rules, rule, isActive); this.applyRule(enabled_rules, disabled_rules, rule, isActive);
}; };
@ -479,7 +479,7 @@ function start() {
* @param {boolean} isActive Is this rule active? * @param {boolean} isActive Is this rule active?
*/ */
this.addReferralMarketing = function (rule, isActive = true) { this.addReferralMarketing = function (rule, isActive = true) {
rule = "([\\/|\\?|#]|(&|&))+(" + rule + "=[^\\/|\\?|&]*)"; rule = "([\\/\\?#]|(&|&))+(" + rule + "=[^\\/\\?&]*)";
this.applyRule(enabled_referralMarketing, disabled_referralMarketing, rule, isActive); this.applyRule(enabled_referralMarketing, disabled_referralMarketing, rule, isActive);
}; };

View File

@ -45,7 +45,7 @@
".*(amazon\\.).*\\/message-us\\?.*" ".*(amazon\\.).*\\/message-us\\?.*"
], ],
"rawRules": [ "rawRules": [
"\\/ref=[^\\/|\\?]*" "\\/ref=[^\\/\\?]*"
], ],
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
@ -104,13 +104,13 @@
".*(google\\.).*(\\/upload)?(\\/drive)\\/.*", ".*(google\\.).*(\\/upload)?(\\/drive)\\/.*",
".*(docs\\.google\\.).*\\/.*", ".*(docs\\.google\\.).*\\/.*",
".*(accounts\\.google\\.).*", ".*(accounts\\.google\\.).*",
".*(google\\.).*\\/searchbyimage\\?image_url=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(google\\.).*\\/searchbyimage\\?image_url=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(hangouts\\.google\\.).*\\/webchat.*zx=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(hangouts\\.google\\.).*\\/webchat.*zx=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(client-channel\\.google\\.).*\\/client-channel.*zx=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(client-channel\\.google\\.).*\\/client-channel.*zx=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(google\\.).*\\/complete\\/search\\?.*gs_[a-zA-Z]*=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(google\\.).*\\/complete\\/search\\?.*gs_[a-zA-Z]*=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(google\\.).*\\/s\\?tbm=map.*gs_[a-zA-Z]*=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(google\\.).*\\/s\\?tbm=map.*gs_[a-zA-Z]*=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(news\\.google\\.).*\\?hl=.*", ".*(news\\.google\\.).*\\?hl=.*",
".*(google\\.).*\\/setprefs\\?.*hl=[^\\/|\\?|&]*(\\/|&(amp;)?)?", ".*(google\\.).*\\/setprefs\\?.*hl=[^\\/\\?&]*(\\/|&(amp;)?)?",
".*(google\\.).*\\/appsactivity\\/.*", ".*(google\\.).*\\/appsactivity\\/.*",
".*(google\\.).*\\/aclk\\?.*" ".*(google\\.).*\\/aclk\\?.*"
], ],
@ -160,12 +160,7 @@
"completeProvider": false, "completeProvider": false,
"rules": [ "rules": [
"(%3F)?utm_[a-zA-Z]*", "(%3F)?utm_[a-zA-Z]*",
"(%3F)?ga_source", "(%3F)?ga_[a-zA-Z_]+",
"(%3F)?ga_medium",
"(%3F)?ga_term",
"(%3F)?ga_content",
"(%3F)?ga_campaign",
"(%3F)?ga_place",
"(%3F)?yclid", "(%3F)?yclid",
"(%3F)?_openstat", "(%3F)?_openstat",
"(%3F)?fb_action_ids", "(%3F)?fb_action_ids",
@ -181,11 +176,12 @@
"(%3F)?hmb_campaign", "(%3F)?hmb_campaign",
"(%3F)?hmb_medium", "(%3F)?hmb_medium",
"(%3F)?hmb_source", "(%3F)?hmb_source",
"(%3F)?[\\?|&]?ref[\\_]?", "(%3F)?[\\?&]?ref[\\_]?",
"(%3F)?gclid", "(%3F)?gclid",
"(%3F)?otm_[a-zA-Z_]*", "(%3F)?otm_[a-zA-Z_]*",
"(%3F)?cmpid", "(%3F)?cmpid",
"(%3F)?os_ehash" "(%3F)?os_ehash",
"(%3F)?_ga"
], ],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
@ -193,11 +189,11 @@
".*([\\.]?matrix\\.org)(\\/_matrix)\\/.*", ".*([\\.]?matrix\\.org)(\\/_matrix)\\/.*",
".*([\\.]?prismic\\.io).*", ".*([\\.]?prismic\\.io).*",
".*([\\.]?gitlab\\.com).*", ".*([\\.]?gitlab\\.com).*",
".*([\\.]?gcsip\\.com).*[\\?|&]ref[\\_]?=[^\\/|\\?|&]*.*", ".*([\\.]?gcsip\\.com).*[\\?&]ref[\\_]?=[^\\/\\?&]*.*",
".*([\\.]?cloudflare\\.com).*", ".*([\\.]?cloudflare\\.com).*",
".*(myaccount.google\\.[a-zA-Z]{2,}).*", ".*(myaccount.google\\.[a-zA-Z]{2,}).*",
".*([\\.]?tangerine\\.ca).*", ".*([\\.]?tangerine\\.ca).*",
".*bugtracker\\.fairphone\\.com\\/.*[\\?|&]ref[\\_]?=[^\\/|\\?|&]*.*", ".*bugtracker\\.fairphone\\.com\\/.*[\\?&]ref[\\_]?=[^\\/\\?&]*.*",
".*(comment-cdn\\.9gag\\.com).*(\\/comment-list.json\\?).*", ".*(comment-cdn\\.9gag\\.com).*(\\/comment-list.json\\?).*",
".*(battle\\.net\\/login).*", ".*(battle\\.net\\/login).*",
".*(blizzard\\.com\\/oauth2).*", ".*(blizzard\\.com\\/oauth2).*",
@ -207,8 +203,8 @@
".*(facebook\\.)\\w{2,}.*(\\/groups\\/member_bio\\/bio_dialog\\/).*", ".*(facebook\\.)\\w{2,}.*(\\/groups\\/member_bio\\/bio_dialog\\/).*",
".*([\\.]?tinkoff\\.ru).*", ".*([\\.]?tinkoff\\.ru).*",
".*(cyberport\\.de).*(\\/adscript\\.php).*", ".*(cyberport\\.de).*(\\/adscript\\.php).*",
".*(\\/refs\\/switch).*\\?.*(%3F)?[\\?|&]?ref[\\_]?=.*", ".*(\\/refs\\/switch).*\\?.*(%3F)?[\\?&]?ref[\\_]?=.*",
".*tweakers\\.net\\/ext\\/lt\\.dsp\\?.*(%3F)?[\\?|&]?ref[\\_]?=.*", ".*tweakers\\.net\\/ext\\/lt\\.dsp\\?.*(%3F)?[\\?&]?ref[\\_]?=.*",
"(https:\\/\\/|http:\\/\\/)git\\..*(\\.[a-zA-Z]{2,}).*\\/commit\\/.*\\/pipelines\\?.*", "(https:\\/\\/|http:\\/\\/)git\\..*(\\.[a-zA-Z]{2,}).*\\/commit\\/.*\\/pipelines\\?.*",
"(https:\\/\\/|http:\\/\\/)git\\..*(\\.[a-zA-Z]{2,}).*\\/.*\\/-\\/branches\\?.*", "(https:\\/\\/|http:\\/\\/)git\\..*(\\.[a-zA-Z]{2,}).*\\/.*\\/-\\/branches\\?.*",
"(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(amazon)(\\.[a-zA-Z]{2,}).*\\/message-us\\?.*" "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(amazon)(\\.[a-zA-Z]{2,}).*\\/message-us\\?.*"
@ -365,8 +361,7 @@
".*out\\.reddit\\.\\w{2,}\\/.*url=([^&]*)" ".*out\\.reddit\\.\\w{2,}\\/.*url=([^&]*)"
], ],
"forceRedirection": false "forceRedirection": false
} },
,
"netflix": { "netflix": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(netflix)(\\.[a-zA-Z]{2,}).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(netflix)(\\.[a-zA-Z]{2,}).*",
"completeProvider": false, "completeProvider": false,
@ -987,17 +982,29 @@
], ],
"forceRedirection": false "forceRedirection": false
}, },
"SPIEGEL ONLINE": { "SPIEGEL ONLINE": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(spiegel)(\\.de)(.*\\?.*)", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(spiegel)(\\.de)(.*\\?.*)",
"completeProvider": false, "completeProvider": false,
"rules": [ "rules": [
"b" "b"
], ],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
"exceptions": [], "exceptions": [],
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
} },
"rutracker.org": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-]*\\.)?(rutracker)(\\.org)(.*\\?.*)",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
}
} }
} }