AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
138 stars 27 forks source link

Add a new scriptlet — 'trusted-prevent-xhr' #417

Open AdamWr opened 3 months ago

AdamWr commented 3 months ago

Similar to - https://github.com/AdguardTeam/Scriptlets/issues/350, but instead of using redirection resources which are limited, we could have a trusted scriptlet which will allow to set any content in response/responseText, and maybe allow to set other values as well. Also generating random content (like in prevent-xhr) would be useful, I think. Something like (just an example):

example.org#%#//scriptlet('trusted-prevent-xhr', 'pagead2.googlesyndication.com', 'length:100-300, responseContent: ins.adsbygoogle-ablated-ad-slot')

in the case if website will check length of response and if it contains specific text.

piquark6046 commented 3 months ago

CC: @gorhill