Index: abp2blocklist.js |
diff --git a/abp2blocklist.js b/abp2blocklist.js |
index 71d227f3e66f9a9f9c044409840967523982d923..c4151e38f4494c335d87f5b08fb98c022bcc53cd 100644 |
--- a/abp2blocklist.js |
+++ b/abp2blocklist.js |
@@ -286,11 +286,24 @@ function logRules() |
{ |
while (selectors.length) |
{ |
+ let selector = selectors.splice(0, selectorLimit).join(", "); |
addRule({ |
trigger: {"url-filter": matchDomain}, |
action: {type: "css-display-none", |
- selector: selectors.splice(0, selectorLimit).join(", ")} |
+ selector: selector} |
}); |
+ |
+ // FIXME - Hack to work around WebKit bug whereby element IDs are |
Sebastian Noack
2016/02/17 08:04:28
I feel that this won't be just a temporary workaro
kzar
2016/02/17 13:45:26
Done.
|
+ // converted to lowercase before being matched. |
+ let lowercaseSelector = selector.replace( |
+ /#[\w-]+/g, match => match.toLowerCase() |
Sebastian Noack
2016/02/17 08:04:28
ID selectors can have escaped special chars, e.g #
kzar
2016/02/17 13:45:26
Acknowledged.
|
+ ); |
+ if (lowercaseSelector != selector) |
+ addRule({ |
Sebastian Noack
2016/02/17 08:04:28
Ideally, we merge the lowercase variants with the
kzar
2016/02/17 13:45:26
Acknowledged.
|
+ trigger: {"url-filter": matchDomain}, |
+ action: {type: "css-display-none", |
+ selector: lowercaseSelector} |
+ }); |
} |
}); |