Enable CosmeticFilteringJsPerformance by default
See original GitHub issueThe feature was implemented in https://github.com/brave/brave-browser/issues/25614 Cosmetic in child frames now is enabled by griffin in https://github.com/brave/brave-variations/pull/466 Now the feature should be enabled with the recommended parameters. Slack thread: https://bravesoftware.slack.com/archives/C01LKMP6X36/p1668103608663869
Steps to verify:
- Cosmetic filtering should works as before, nothing should be changed. For sites with a lot of DOM changes another algorithm is used, but the results should be the same.
- Child frames + Speedometer2 score: Enabling/disabling flag
BraveAdblockCosmeticFilteringChildFramesshouldn’t affect the score on https://browserbench.org/Speedometer2.0/. Pplease take into account that local results will have some deviations.
Issue Analytics
- State:
- Created 10 months ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Procedural cosmetic filters · gorhill/uBlock Wiki - GitHub
Regular cosmetic filters are declarative, i.e., they are used as a selector in a CSS rule and handled by browsers through style tag...
Read more >Not all adblockers are born equal - Tech @ Cliqz
js . Cosmetic Filters. Cosmetic filters are not triggered by requests, but modify pages (or frames, to be precise). Their targeting logic is ......
Read more >Third-party cosmetic filtering - Brave Browser
Our approach is to make a best-effort, runtime decision about whether a cosmetic filter list rule would hide only third-party advertisement ...
Read more >uBlock Origin: The Ultimate Review and Guide
uBO provides two powerful tools to allow users to perform “cosmetic filtering.” These tools are the Element Zapper and the Element Picker.
Read more >[Support] uBlock Origin - Mozilla Discourse
Check settings or popup panel for “Disable cosmetic filtering” option. ... may try experimental scriptlet example.com##script:inject(overlay-buster.js) .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The added elements simulate some unwanted ads and the custom rules simulate adblock files rules.
So if you have those custom rules them all the added element should be hidden. If you don’t have the rules: they should be visible.
Verified
PASSEDusingCosmetic filtering not enabled -
PASSED1.47.123example.comhttps://github.com/brave/brave-browser/issues/26861#issuecomment-1335605869Done! Scroll to the end to check if there is any visible new element is shown in the consoleappearsConfirmed dynamically added elements aren’t blocked
Cosmetic filtering enabled -
PASSEDcontinue from
Case 1example.comsitehttps://github.com/brave/brave-browser/issues/26861#issuecomment-1335605869Done! Scroll to the end to check if there is any visible new element is shown in the consolemessage appearsConfirmed dynamically added elements are blocked
Child frames + Speedometer2 score -
PASSEDbrave://flags#brave-adblock-cosmetic-filtering-child-frameshttps://browserbench.org/Speedometer2.0/Start TestDisabledbrave://flags#brave-adblock-cosmetic-filtering-child-frameshttps://browserbench.org/Speedometer2.0/Start Test