Changes between Version 21 and Version 42 of Ticket #7067


Ignore:
Timestamp:
01/25/2019 05:47:14 PM (19 months ago)
Author:
hfiguiere
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7067

    • Property Blocking changed from 7072 to
    • Property Summary changed from Implement $redirect filter option to Allow $rewrite to internal resources.
  • Ticket #7067 – Description

    v21 v42  
    11=== Background === 
    2 Implement the `$redirect` filter option for blocking filters. 
     2Allow $rewrite to internal resources. 
    33 
    4 This option take one parameter which is the name of a "resource". 
     4This option still take one parameter which is the name of a "resource", prefixed by `abp-resource:`. 
    55 
    6 Its effect is that instead of blocking the request, it will give the content of the "resource" instead. Resources are built into the WebExtension and cannot be third-party. 
     6Its effect is that the URL rewrite will give the content of the "resource" instead. Resources are built into the WebExtension and cannot be third-party. 
    77 
    8 The `$redirect` option requires that the URL contains a host (`||` or `*`) 
    9 and also that a `$domain` or `$~third-party` option be present. 
     8In that case the `$rewrite` option requires that the URL contains a host (`||` or `*`) and also that a `$domain` or `$~third-party` option be present. 
    109 
    1110Use case are as follow: 
    1211- send a useless (no-op) JS script and not trigger the onerror handle 
    1312- neutralise tracking pixel/images by providing its own and never hitting the remote server. 
     13- Send an empty soundfile that will replace one that in unwanted. 
    1414 
    15 The behaviour and syntax should be as close as possible from uBlock-Origins. 
    1615=== What to change === 
    1716 
    18 - In the file `filterClass.js` add support for the `$rewrite` option when  parsing the filters, validating it. 
     17- In the file `filterClass.js` modify the support for the `$rewrite` option when  parsing the filters, validating it. 
    1918- Add it to the unit tests. 
    2019- Implement the resource retrieval. 
    2120- Add relevant resources to a separate file like it is done for snippets. 
    2221 
    23 Changes will need to be done in the WebExtension as well. See issue #7072. 
     22No changes need to be done in the WebExtension beside updating the adblockpluscore dependency. 
    2423 
    2524=== Hints for testers ===