Open piquark6046 opened 6 months ago
You can use #text
as a nodeName
in remove-node-text
, for example something like:
zdnet.co.kr#%#//scriptlet('remove-node-text', '#text', 'Blocked by AdGuard')
Or do you mean that you would like to have something like selector > #text
?
I did not test with #text
as a second parameter.
To avoid an incorrect blocking, I think that selector > #text
is better.
By the way, Is using the #text
as a second parameter in remove-node-text
scriptlet Adguard scriptlet's own feature?
By the way, Is using the #text as a second parameter in remove-node-text scriptlet Adguard scriptlet's own feature?
I don't think so.
For text
nodes, the nodeName
returns #text
- https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName, so it's rather not an own feature.
Sometime a filter maintainer needs to remove a string in an element's child text.
For a real case, a leftover created by AdGuard CoreLibs-based program is not removed by the
remove-node-text
scriptlet.https://zdnet.co.kr/view/?no=20231026135022
Screenshot
![Screenshot from 2024-01-02 23-48-47](https://github.com/AdguardTeam/Scriptlets/assets/98787049/82244b92-97e3-4ff2-8fb8-30dd539a0550)Before you test the real case, please add the following filter: