-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filters compiler should remove cosmetic rules with modifiers for the …
…platforms where they're not supported (#655) * Fix AdguardTeam/FiltersCompiler#152, disabled cosmetic rules modifiers for iOS/Safari * fix readme
- Loading branch information
Showing
6 changed files
with
91 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.DS_Store | ||
.idea | ||
.vscode | ||
node_modules | ||
platforms | ||
log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Temporary excluding cosmetic rules with modifiers from iOS and Safari: | ||
// https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#non-basic-rules-modifiers | ||
// The regular expression that does it is: "^\\[.+?\\].*#(\\$|\\@|\\?|\\@){0,2}#" | ||
// TODO: should be removed after iOS and Safari versions are updated with | ||
// SafariConverterLib v2.0.28 or higher. | ||
module.exports = { | ||
"IOS": { | ||
"platform": "ios", | ||
"path": "ios", | ||
"configuration": { | ||
"removeRulePatterns": [ | ||
"\\$\\$|\\$\\@\\$", | ||
"\\$(.*,)?mp4", | ||
"\\$(.*,)?replace=", | ||
"\\$stealth", | ||
",stealth", | ||
"\\$cookie", | ||
",cookie", | ||
"important,replace=", | ||
"\\$(.*,)?app", | ||
"\\$protobuf", | ||
"important,protobuf", | ||
"\\$redirect=", | ||
",redirect=", | ||
"\\$redirect-rule=", | ||
",redirect-rule=", | ||
"\\$empty", | ||
",empty", | ||
"\\$webrtc", | ||
"\\$csp=", | ||
"\\$network", | ||
"^\\[.+?\\].*#(\\$|\\@|\\?|\\@){0,2}#" | ||
], | ||
"ignoreRuleHints": false | ||
}, | ||
"defines": { | ||
"adguard": true, | ||
"adguard_app_ios": true | ||
} | ||
}, | ||
"EXTENSION_SAFARI": { | ||
"platform": "ext_safari", | ||
"path": "extension/safari", | ||
"configuration": { | ||
"removeRulePatterns": [ | ||
"\\$\\$|\\$\\@\\$", | ||
"\\$(.*,)?mp4", | ||
"\\$(.*,)?replace=", | ||
"\\$stealth", | ||
",stealth", | ||
"\\$cookie", | ||
",cookie", | ||
"important,replace=", | ||
"\\$(.*,)?app", | ||
"\\$network", | ||
"\\$protobuf", | ||
"important,protobuf", | ||
"\\$csp", | ||
"\\$extension", | ||
",extension", | ||
"\\$redirect=", | ||
",redirect=", | ||
"\\$redirect-rule=", | ||
",redirect-rule=", | ||
"\\$empty", | ||
",empty", | ||
"\\$webrtc", | ||
"^\\[.+?\\].*#(\\$|\\@|\\?|\\@){0,2}#" | ||
], | ||
"ignoreRuleHints": false | ||
}, | ||
"defines": { | ||
"adguard": true, | ||
"adguard_ext_safari": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters