DescriptionImplement support for the generichide option
Let's say we have these filters:
##.ad
blogspot.com##div.textad
@@||googleblog.blogspot.com^$elemhide
@@||youtube.com^$generichide
After this change, the program will generate the following rules:
[
{
"trigger": {
"url-filter": "^https?://",
"url-filter-is-case-sensitive": true
},
"action": {
"type": "css-display-none",
"selector": ".ad"
}
},
{
"trigger": {
"url-filter": "^https?://([^/]+\\.)?youtube\\.com",
"url-filter-is-case-sensitive": true
},
"action": {
"type": "ignore-previous-rules"
}
},
{
"trigger": {
"url-filter": "^https?://([^/:]*\\.)?blogspot\\.com[/:]",
"url-filter-is-case-sensitive": true
},
"action": {
"type": "css-display-none",
"selector": "div.textad"
}
},
{
"trigger": {
"url-filter": "^https?://([^/]+\\.)?googleblog\\.blogspot\\.com",
"url-filter-is-case-sensitive": true
},
"action": {
"type": "ignore-previous-rules"
}
}
]
Patch Set 1 #
Total comments: 1
Patch Set 2 : Use separate array for generic selectors #
Total comments: 2
Patch Set 3 : Make matchDomain argument non-optional #Patch Set 4 : Fix indentation #
MessagesTotal messages: 10
|