Changes between Initial Version and Version 5 of Ticket #5653


Ignore:
Timestamp:
02/21/2018 04:54:24 PM (20 months ago)
Author:
juliandoucette
Comment:

BUMP: We can use this to fix a lot of inconsistency and reduce manual labour. Please prioritize accordingly.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5653

    • Property Cc ire added
  • Ticket #5653 – Description

    initial v5  
    11=== Background === 
    22 
    3 See attached email thread. 
     3See attached [https://issues.adblockplus.org/attachment/ticket/5653/CMS%20hooks%3Aconverters.pdf email thread]. 
     4 
     5TL;DR I'd like a way to make automated changes to entire pages e.g. adding `target="_blank"` to all anchor tags that have external hrefs. I could do this by e.g. searching for `<a [*]*>` and adding `target="_blank"` if the result does not contain the siteurl. 
    46 
    57=== What to change === 
    68 
    7 1. Load filters/hooks from a directory (e.g. "converters" or "hooks") 
    8 2. Call the rendered event/filter/hook after rendering a page 
    9 3. Execute filters/hooks that implement the rendered event/filter/hook; allowing them to manipulate a rendered page 
    10  
    11 --- 
    12  
    13 PS: Sorry about the confusing labels and "What to change" here. It's unfortunate that we already have a concept of "filters" from Jinja in our CMS because I prefer the label "filters" for this functionality. I guess "converters" also makes sense? 
     9Execute "hooks" provided in "hooks" website directory. "hooks" are like "filters" except that they are applied to entire pages after rendering/converting.