Accept external content button not working in Brave only

On the Swiss national media website, there are sometimes divs with the id cookie-blocking-card that allow to display external infographics.
For example on this page

On both desktop and mobile and in both a normal or private tabs, clicking the red button to accept the external content fails to work in Brave.
No problem in Chrome.
external

It works fine in Chrome, because Chrome doesn’t have an adblocker…
It is the Cookie Notices that have a problem, you are forced to accept it and Easylist cookie notices is blocking it completely.
If you add @@||usercentrics.eu^$3p,domain=rts.ch rule fixes it rule in brave://adblock, it will work because you can opt the cookies.

Change the category of your post to adblocking and wait for fanboynz to fix it.

The things is there is a way to set a cookie now for users, any cookie and any local storage, only 1 cookie and 2 local storages would be enough to bypass this, but the problem is it won’t work.

rts.ch##+js(trusted-set-cookie, rts-consent-cookie, essential%2CcustomCategory-37e8dfb9-5b08-4500-819f-f838d37a030b%2CcustomCategory-c983c522-acc5-4cd4-bc4c-e6d79f26c390)
rts.ch##+js(trusted-set-local-storage-item, uc_user_interaction, true)
rts.ch##+js(trusted-set-local-storage-item, uc_settings, )

The problem is the set cookie will set the cookie in www.rts.ch, and not in .rts.ch, like it is expected… which matters, so it can’t be seen by the page.
I requested uBlock developers to consider it to add a solution and they didn’t care or didn’t understand the issue, they marked my post as duplicate for no reason which didn’t help, so it wasn’t added as it should.

But I made my solution by modifying Brave resources file and modified this part of the scriptlet: https://github.com/gorhill/uBlock/blob/f0cd93335ed26238373f5b150fe6f949b9c11380/assets/resources/scriptlets.js#L773C23-L773C23

from if ( path !== '' && path !== '/' ) { return; } to if ( path !== '' && path !== '/' && path !== 'none' ) { cookieParts.push('; path=/', '; domain=', path); }

so it keeps compatibility with any rule in place and I just modify the path to also include the domain.
So it works with my fix, but gorhill didn’t think it is a big deal. so I guess whitelisting the whole thing is the only solution.

1 Like

Finally thanks to this issue, I made a new github account, created a new issue, got flagged by Github, had to unflag my account, but finally gorhill added domain in the set-cookie ublock scriptlet!

Next Resources update Version: 1.0.75 (brave://components/ → Brave Ad Block Resources Library) shall include it, so this will finally work:

rts.ch##+js(trusted-set-cookie-reload, rts-consent-cookie, essential%2CcustomCategory-37e8dfb9-5b08-4500-819f-f838d37a030b%2CcustomCategory-c983c522-acc5-4cd4-bc4c-e6d79f26c390, , , domain, rts.ch)
rts.ch##+js(trusted-set-local-storage-item, uc_user_interaction, true)
rts.ch##+js(trusted-set-local-storage-item, uc_settings, uc_settings, )

you can use trusted-set-cookie-reload
or trusted-set-cookie and add , , , domain, rts.ch, reload, 1)

I spent 11 months fixing it and sideloading myself and requesting it, but nobody cared to add it until today, but finally found the ‘excuse’ for them to understand the issue thanks to rts.ch and you. :+1:

This is nice for the future of rules for scriptlets and set-cookie.

Remember to go and remove the @@||usercentrics.eu^$3p,domain=rts.ch and add these scriptlet set-cookie and set-local-storage-item ones, it should work… at least for now!.. but this means the website will be functional and you don’t need to get tracked by the usercentrics.eu anymore.

1 Like

Congratulations!

Thanks for the hard work!

Thanks!
This is the issue of depending on a 3p for resources, even if they are the best like uBlock scriptlets.
But Brave still hasn’t updated the components, still 1.0.74… but hopefully soon. I even told gorhill I always expect to wait 300 years for the components to get updated lol

I sideload scriptlets by modifying Brave files directly, so it doesn’t affect me, but normal users can’t use it yet. But when you see 1.0.75, it will work… soon! maybe today.

Edit: 1.0.75 is available :+1:test it only with the 3 rts.ch##+js(trusted-set. . . . . ) and see if it works for you, instead of whitelisting the whole thing.

Yes, since the update, I can confirm it works without adding any rule.

Excellent!

I don’t know if this is related, but I tried to watch this video documentary on RTS today

and the play button does not appear in Brave (maybe because cookies need to be accepted first)
The problem occurs on mobile and desktop.
No problem with Chrome.

You may not be able to reproduce the problem outside of Switzerland without a vpn, because these videos are generally only available from Switzerland.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.