Closed
Description
Similar to - #199 (comment) but for prevent-fetch
.
Also adding Content-Length
header to response would be a good idea, related to - AdguardTeam/AdguardFilters#175797 and AdguardTeam/AdguardFilters#176137
Steps to reproduce:
- Add this rule:
example.org#%#//scriptlet('prevent-fetch', 'pagead2.googlesyndication.com')
- Go to -
https://example.org/
- In browser console run:
(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.