Changes between Version 32 and Version 34 of Ticket #3143

06/01/2017 11:05:10 AM (3 years ago)

I updated the description, the syntax modification is now #5287.


  • Ticket #3143

    • Property Blocked By changed from 4394, 4726, 4796, 4962 to 4394, 4726, 4796, 4962, 5287
  • Ticket #3143 – Description

    v32 v34  
    1212=== What to change === 
    13 - Introduce a new syntax specifically for element hiding emulation filters: 
    14  {{{ 
    15 :-abp-properties(background-color:#fff) bar 
    16 }}} 
    17  Note `#?#` instead of `##` indicating that this isn't a regular element hiding filter but that the selector is rather being evaluated by Adblock Plus and some additional pseudo-classes are allowed. 
    18 - Make `filterClasses` module translate legacy filters like ` [-abp-properties="background-color:#fff"] bar` into ` :-abp-properties(background-color:#fff) bar` "on the fly." The list should show the modified filter so that people stop using the legacy syntax ASAP. It's probably best to modify `Filter.fromText()` for that (otherwise `Filter.fromText()` might cache two copies of the same filter). 
    19 - Special pseudo-classes to be supported are `:-abp-properties(...)` and `:-abp-has(...)`. The latter should allow nesting pseudo-classes, in particular `:-abp-has(:-abp-properties(...))` should be possible. Filters without any special pseudo-classes should be ignored, to make sure that users don't use element hiding emulation filters where regular emulate hiding would do. 
     13- A new special pseudo-classe `:-abp-has(...)` should be added. Here, the parameter is a selector - this pseudo-class should only match elements where the inner selector produces any hits. 
     14* It should be possible to nest pseudo-classes, in particular `:-abp-has(:-abp-properties(...))` has to be supported. 
    2015- `ElemHideEmulation` class should get a new `removeElements` callback, to be called for any elements selected by filters with `:-abp-has()` pseudo-class. Filters only using `:-abp-properties()` should use `addSelectors` callback as before.