Open AdamWr opened 3 months ago
Similar to - https://github.com/AdguardTeam/Scriptlets/issues/199#issuecomment-1063271758 but for prevent-fetch.
prevent-fetch
Also adding Content-Length header to response would be a good idea, related to - https://github.com/AdguardTeam/AdguardFilters/issues/175797 and https://github.com/AdguardTeam/AdguardFilters/issues/176137
Content-Length
Steps to reproduce:
example.org#%#//scriptlet('prevent-fetch', 'pagead2.googlesyndication.com')
https://example.org/
(async () => { const ads = await fetch('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'); const contentLength = (await ads.text()).length; const contentLengthHeader = Number(ads.headers.get('Content-Length')); if (!ads.ok || contentLength < 100 || contentLengthHeader < 100) { alert('Ads are blocked!'); } })();
Alert will be displayed.
Similar to - https://github.com/AdguardTeam/Scriptlets/issues/199#issuecomment-1063271758 but for
prevent-fetch
.Also adding
Content-Length
header to response would be a good idea, related to - https://github.com/AdguardTeam/AdguardFilters/issues/175797 and https://github.com/AdguardTeam/AdguardFilters/issues/176137Steps to reproduce:
https://example.org/
Alert will be displayed.