Scriptlets icon indicating copy to clipboard operation
Scriptlets copied to clipboard

Fix 'trusted-click-element' — Cloudflare captcha is broken when '>>>' combinator is used

Open AdamWr opened this issue 8 months ago • 0 comments

Related to - https://github.com/AdguardTeam/AdguardFilters/issues/202188

It looks like Cloudflare captcha does not like when their element in shadow DOM is modified. It's caused by this line: https://github.com/AdguardTeam/Scriptlets/blob/d12f6bf7f1cec5c54a83677a01f2485211adf40e/src/scriptlets/trusted-click-element.ts#L195

Maybe as a simple workaround we could just check a stack trace and do not change mode to open if attachShadow call is from challenges.cloudflare.com?

AdamWr avatar Apr 02 '25 15:04 AdamWr