| Index: include.preload.js |
| diff --git a/include.preload.js b/include.preload.js |
| index 86e52c32afceb894f6591a84b0eca3b1842383ce..8fb6e6aebb6df8c1c8de8bedf0b7fa64896a5d1f 100644 |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -490,11 +490,27 @@ ElemHide.prototype = { |
| return shadow; |
| }, |
| - addSelectors: function(selectors) |
| + addSelectors: function(selectors, filters) |
| { |
| if (selectors.length == 0) |
| return; |
| + // In case of an ElemHideEmulationFilter the selector doesn't match the |
| + // selector of the filter ([-abp-properties=...] vs actual css selector |
| + // depending on the sites css). To still allow the devtools panel to find |
| + // the correct filter addSelector gets also passed the filterText of the |
| + // ElemHideEmulationFilter used to produce the selectors. |
| + if (filters) |
|
Sebastian Noack
2017/01/12 17:03:29
Yeah, this is more like it works on Firefox curren
Sebastian Noack
2017/01/12 17:03:29
And yes, it's also not great that we message the b
wspee
2017/01/19 16:20:15
Done.
wspee
2017/01/19 16:20:15
Done.
|
| + { |
| + let traceSelectors = []; |
| + for (let filter of filters) |
| + traceSelectors.push(filter.replace(/^.*?##/, "")); |
| + ext.backgroundPage.sendMessage({ |
| + type: "devtools.traceElemHide", |
| + selectors: traceSelectors |
| + }); |
| + } |
| + |
| if (!this.style) |
| { |
| // Create <style> element lazily, only if we add styles. Add it to |