You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now cosmetic filters simply add "display: none" to relevant elements - just as documented and as other blockers do with this class of filters. Is it possible to add an option to completely delete matched elements from DOM?
The goal of such option would be to futher reduce page's footprint which would be especially important to people who keep hundreds of tab open (like me).
If it is not possible on injection phase, some unique token can be injected along with "display: none" to style or attributes and then subsequent delayed pass can go over those elements and remove them after load.
The text was updated successfully, but these errors were encountered:
Element removal is not something to be used except maybe in very exceptional cases, such that this would maybe better left to a scriplet or special operator. The main issue is that removing elements may unleash mayhem in the DOM. Consider a filter such as:
###blah:first-child + div
Normally, only one element will be targeted by such filter. However if you remove the targeted element, an new one become targeted, until there is no more div to remove. So removing elements has a good potential to seriously change the semantic of existing filters.
At most I have entertained the idea of a :remove operator, but the need for it must be justified with enough real world cases.
Right now cosmetic filters simply add "display: none" to relevant elements - just as documented and as other blockers do with this class of filters. Is it possible to add an option to completely delete matched elements from DOM?
The goal of such option would be to futher reduce page's footprint which would be especially important to people who keep hundreds of tab open (like me).
If it is not possible on injection phase, some unique token can be injected along with "display: none" to style or attributes and then subsequent delayed pass can go over those elements and remove them after load.
The text was updated successfully, but these errors were encountered: