Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs?
by Sephr on Friday July 30, 2021 @08:26PM
(#28014034)
Regular expression replaces on content are very fragile. Unfortunately, browsers do not yet provide general request regulation capabilities. Until then, Transcend Consent Manager's API can solve this much more easily with a more robust request-override based approach:
[ Parent
| on HN ]
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs?
by rasz on Saturday July 31, 2021 @01:16AM
(#28015486)
Its true URLSearchParams is a proper blessed way of working with url parameters, but its just my tiny userscript working on a serialized JSON, so either I grep and be done with it, or be forced to actually parse it, traverse huge Object looking for 100 individual URL fields to modify "properly", and stringlify once again. Im good with regex thank you :)
>Transcend Consent Manager's API
what is that?
>request-override based approach
the idea is to modify those URLs before they get rendered on the page, this way they get applied :visited style in the first place.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs?
by Sephr on Saturday July 31, 2021 @12:58PM
(#28019799)
> what is that?
A new consent management tool for website owners. We're currently in closed beta. Learn more here: https://transcend.io/blog/defeating-cookie-banners
> the idea is to modify those URLs before they get rendered on the page
These overrides are applied before the URLs are rendered on the page or trigger any requests.
Re:Ask HN: Why is YouTube adding “&pp=sAQA” to video URLs?
by rasz on Sunday August 01, 2021 @12:22AM
(#28023779)
>DOM nodes by directly patching the prototypes, methods, and accessors of all global element constructors and DOM tree construction utilities. We can write a patcher which overrides the constructor prototype, which allows us to check if the URL is allowed before the DOM mutation is performed.
Now I understand. Your product is aimed at corporations seeking more mature? compliance with privacy laws. Sounds like tough market.